1
2
3
4 package joeq.Assembler.x86;
5
6 import joeq.Allocator.CodeAllocator;
7 import jwutil.strings.Strings;
8 import jwutil.util.Assert;
9
10 /***
11 * x86
12 *
13 * @author John Whaley <jwhaley@alum.mit.edu>
14 * @version $Id: x86.java 1941 2004-09-30 03:37:06Z joewhaley $
15 */
16 public class x86 implements x86Constants {
17
18 int opcode;
19 int length;
20 int pairing;
21 int microops;
22 String desc;
23
24 public static final x86 AAA = _op(0x37, 1, -1, -1, "AAA");
25 public static final x86 AAD = _op(0xD50A, 2, -1, -1, "AAD");
26 public static final x86 AAM = _op(0xD40A, 2, -1, -1, "AAM");
27 public static final x86 AAS = _op(0x3F, 1, -1, -1, "AAS");
28 public static final x86 ADC_ra_i8 = _op(0x14, 1, PU, 2, "ADC_ra_i8");
29 public static final x86 ADC_ra_i32 = _op(0x15, 1, PU, 2, "ADC_ra_i32");
30 public static final x86 ADC_r_i8 = _op(0x8010, 2, PU, 2, "ADC_r_i8");
31 public static final x86 ADC_r_i32 = _op(0x8110, 2, PU, 2, "ADC_r_i32");
32 public static final x86 ADC_r_r8 = _op(0x1200, 2, PU, 2, "ADC_r_r8");
33 public static final x86 ADC_r_r32 = _op(0x1300, 2, PU, 2, "ADC_r_r32");
34 public static final x86 ADC_r_m8 = _op(0x1200, 2, PU, 3, "ADC_r_m8");
35 public static final x86 ADC_r_m32 = _op(0x1300, 2, PU, 3, "ADC_r_m32");
36 public static final x86 ADC_m_i8 = _op(0x8010, 2, PU, 4, "ADC_m_i8");
37 public static final x86 ADC_m_i32 = _op(0x8110, 2, PU, 4, "ADC_m_i32");
38 public static final x86 ADC_m_r8 = _op(0x1000, 2, PU, 4, "ADC_m_r8");
39 public static final x86 ADC_m_r32 = _op(0x1100, 2, PU, 4, "ADC_m_r32");
40 public static final x86 ADD_ra_i8 = _op(0x04, 1, UV, 1, "ADD_ra_i8");
41 public static final x86 ADD_ra_i32 = _op(0x05, 1, UV, 1, "ADD_ra_i32");
42 public static final x86 ADD_r_i8 = _op(0x8000, 2, UV, 1, "ADD_r_i8");
43 public static final x86 ADD_r_i32 = _op(0x8100, 2, UV, 1, "ADD_r_i32");
44 public static final x86 ADD_r_r8 = _op(0x0200, 2, UV, 1, "ADD_r_r8");
45 public static final x86 ADD_r_r32 = _op(0x0300, 2, UV, 1, "ADD_r_r32");
46 public static final x86 ADD_r_m8 = _op(0x0200, 2, UV, 2, "ADD_r_m8");
47 public static final x86 ADD_r_m32 = _op(0x0300, 2, UV, 2, "ADD_r_m32");
48 public static final x86 ADD_m_i8 = _op(0x8000, 2, UV, 4, "ADD_m_i8");
49 public static final x86 ADD_m_i32 = _op(0x8100, 2, UV, 4, "ADD_m_i32");
50 public static final x86 ADD_m_r8 = _op(0x0100, 2, UV, 4, "ADD_m_r8");
51 public static final x86 ADD_m_r32 = _op(0x0100, 2, UV, 4, "ADD_m_r32");
52 public static final x86 AND_ra_i8 = _op(0x24, 1, UV, 1, "AND_ra_i8");
53 public static final x86 AND_ra_i32 = _op(0x25, 1, UV, 1, "AND_ra_i32");
54 public static final x86 AND_r_i8 = _op(0x8020, 2, UV, 1, "AND_r_i8");
55 public static final x86 AND_r_i32 = _op(0x8120, 2, UV, 1, "AND_r_i32");
56 public static final x86 AND_r_r8 = _op(0x2200, 2, UV, 1, "AND_r_r8");
57 public static final x86 AND_r_r32 = _op(0x2300, 2, UV, 1, "AND_r_r32");
58 public static final x86 AND_r_m8 = _op(0x2200, 2, UV, 2, "AND_r_m8");
59 public static final x86 AND_r_m32 = _op(0x2300, 2, UV, 2, "AND_r_m32");
60 public static final x86 AND_m_i8 = _op(0x8020, 2, UV, 4, "AND_m_i8");
61 public static final x86 AND_m_i32 = _op(0x8120, 2, UV, 4, "AND_m_i32");
62 public static final x86 AND_m_r8 = _op(0x2000, 2, UV, 4, "AND_m_r8");
63 public static final x86 AND_m_r32 = _op(0x2100, 2, UV, 4, "AND_m_r32");
64 public static final x86 ARPL = _op(0x6300, 2, -1, -1, "ARPL");
65 public static final x86 BOUND = _op(0x6200, 2, -1, -1, "BOUND");
66 public static final x86 BSF = _op(0x0FBC, 2, -1, -1, "BSF");
67 public static final x86 BSR = _op(0x0FBD, 2, -1, -1, "BSR");
68 public static final x86 BSWAP = _op(0x0FC8, 2, -1, -1, "BSWAP");
69 public static final x86 BT_r_i = _op(0x0FBA20, 3, -1, -1, "BT_r_i");
70 public static final x86 BT_r_r = _op(0x0FA3, 2, -1, -1, "BT_r_r");
71 public static final x86 BT_m_i = _op(0x0FBA20, 3, -1, -1, "BT_m_i");
72 public static final x86 BT_m_r = _op(0x0FA3, 2, -1, -1, "BT_m_r");
73 public static final x86 BTC_r_i = _op(0x0FBA38, 3, -1, -1, "BTC_r_i");
74 public static final x86 BTC_r_r = _op(0x0FBB, 2, -1, -1, "BTC_r_r");
75 public static final x86 BTC_m_i = _op(0x0FBA38, 3, -1, -1, "BTC_m_i");
76 public static final x86 BTC_m_r = _op(0x0FBB, 2, -1, -1, "BTC_m_r");
77 public static final x86 BTR_r_i = _op(0x0FBA30, 3, -1, -1, "BTR_r_i");
78 public static final x86 BTR_r_r = _op(0x0FB3, 2, -1, -1, "BTR_r_r");
79 public static final x86 BTR_m_i = _op(0x0FBA30, 3, -1, -1, "BTR_m_i");
80 public static final x86 BTR_m_r = _op(0x0FB3, 2, -1, -1, "BTR_m_r");
81 public static final x86 BTS_r_i = _op(0x0FBA28, 3, -1, -1, "BTS_r_i");
82 public static final x86 BTS_r_r = _op(0x0FAB, 2, -1, -1, "BTS_r_r");
83 public static final x86 BTS_m_i = _op(0x0FBA28, 3, -1, -1, "BTS_m_i");
84 public static final x86 BTS_m_r = _op(0x0FAB, 2, -1, -1, "BTS_m_r");
85 public static final x86 CALL_rel32 = _op(0xE8, 1, -1, -1, "CALL_rel32");
86 public static final x86 CALL_r = _op(0xFF10, 2, -1, -1, "CALL_r");
87 public static final x86 CALL_abs = _op(0x9A, 1, -1, -1, "CALL_abs");
88 public static final x86 CALL_m = _op(0xFF10, 2, -1, -1, "CALL_m");
89 public static final x86 CBW = _op(0x98, 1, -1, -1, "CBW");
90 public static final x86 CLC = _op(0xF8, 1, -1, -1, "CLC");
91 public static final x86 CLI = _op(0xFA, 1, -1, -1, "CLI");
92 public static final x86 CLTS = _op(0x0F06, 2, -1, -1, "CLTS");
93 public static final x86 CMC = _op(0xF5, 1, -1, -1, "CMC");
94 public static final x86 CMOVAr_r = _op(0x0F4700, 3, -1, -1, "CMOVAr_r");
95 public static final x86 CMOVAr_m = _op(0x0F4700, 3, -1, -1, "CMOVAr_m");
96 public static final x86 CMOVAEr_r = _op(0x0F4300, 3, -1, -1, "CMOVAEr_r");
97 public static final x86 CMOVAEr_m = _op(0x0F4300, 3, -1, -1, "CMOVAEr_m");
98 public static final x86 CMOVBr_r = _op(0x0F4200, 3, -1, -1, "CMOVBr_r");
99 public static final x86 CMOVBr_m = _op(0x0F4200, 3, -1, -1, "CMOVBr_m");
100 public static final x86 CMOVBEr_r = _op(0x0F4600, 3, -1, -1, "CMOVBEr_r");
101 public static final x86 CMOVBEr_m = _op(0x0F4600, 3, -1, -1, "CMOVBEr_m");
102 public static final x86 CMOVEr_r = _op(0x0F4400, 3, -1, -1, "CMOVEr_r");
103 public static final x86 CMOVEr_m = _op(0x0F4400, 3, -1, -1, "CMOVEr_m");
104 public static final x86 CMOVGr_r = _op(0x0F4F00, 3, -1, -1, "CMOVGr_r");
105 public static final x86 CMOVGr_m = _op(0x0F4F00, 3, -1, -1, "CMOVGr_m");
106 public static final x86 CMOVGEr_r = _op(0x0F4D00, 3, -1, -1, "CMOVGEr_r");
107 public static final x86 CMOVGEr_m = _op(0x0F4D00, 3, -1, -1, "CMOVGEr_m");
108 public static final x86 CMOVLr_r = _op(0x0F4C00, 3, -1, -1, "CMOVLr_r");
109 public static final x86 CMOVLr_m = _op(0x0F4C00, 3, -1, -1, "CMOVLr_m");
110 public static final x86 CMOVLEr_r = _op(0x0F4E00, 3, -1, -1, "CMOVLEr_r");
111 public static final x86 CMOVLEr_m = _op(0x0F4E00, 3, -1, -1, "CMOVLEr_m");
112 public static final x86 CMOVNEr_r = _op(0x0F4500, 3, -1, -1, "CMOVNEr_r");
113 public static final x86 CMOVNEr_m = _op(0x0F4500, 3, -1, -1, "CMOVNEr_m");
114 public static final x86 CMOVNOr_r = _op(0x0F4100, 3, -1, -1, "CMOVNOr_r");
115 public static final x86 CMOVNOr_m = _op(0x0F4100, 3, -1, -1, "CMOVNOr_m");
116 public static final x86 CMOVNPr_r = _op(0x0F4B00, 3, -1, -1, "CMOVNPr_r");
117 public static final x86 CMOVNPr_m = _op(0x0F4B00, 3, -1, -1, "CMOVNPr_m");
118 public static final x86 CMOVNSr_r = _op(0x0F4900, 3, -1, -1, "CMOVNSr_r");
119 public static final x86 CMOVNSr_m = _op(0x0F4900, 3, -1, -1, "CMOVNSr_m");
120 public static final x86 CMOVOr_r = _op(0x0F4000, 3, -1, -1, "CMOVOr_r");
121 public static final x86 CMOVOr_m = _op(0x0F4000, 3, -1, -1, "CMOVOr_m");
122 public static final x86 CMOVPr_r = _op(0x0F4A00, 3, -1, -1, "CMOVPr_r");
123 public static final x86 CMOVPr_m = _op(0x0F4A00, 3, -1, -1, "CMOVPr_m");
124 public static final x86 CMOVSr_r = _op(0x0F4800, 3, -1, -1, "CMOVSr_r");
125 public static final x86 CMOVSr_m = _op(0x0F4800, 3, -1, -1, "CMOVSr_m");
126 public static final x86 CMP_ra_i8 = _op(0x3C, 1, UV, 1, "CMP_ra_i8");
127 public static final x86 CMP_ra_i32 = _op(0x3D, 1, UV, 1, "CMP_ra_i32");
128 public static final x86 CMP_r_i8 = _op(0x8038, 2, UV, 1, "CMP_r_i8");
129 public static final x86 CMP_r_i32 = _op(0x8138, 2, UV, 1, "CMP_r_i32");
130 public static final x86 CMP_r_r8 = _op(0x3A00, 2, UV, 1, "CMP_r_r8");
131 public static final x86 CMP_r_r32 = _op(0x3B00, 2, UV, 1, "CMP_r_r32");
132 public static final x86 CMP_r_m8 = _op(0x3A00, 2, UV, 2, "CMP_r_m8");
133 public static final x86 CMP_r_m32 = _op(0x3B00, 2, UV, 2, "CMP_r_m32");
134 public static final x86 CMP_m_i8 = _op(0x8038, 2, UV, 2, "CMP_m_i8");
135 public static final x86 CMP_m_i32 = _op(0x8138, 2, UV, 2, "CMP_m_i32");
136 public static final x86 CMP_m_r8 = _op(0x3800, 2, UV, 2, "CMP_m_r8");
137 public static final x86 CMP_m_r32 = _op(0x3900, 2, UV, 2, "CMP_m_r32");
138 public static final x86 CMPSB = _op(0xA6, 1, -1, -1, "CMPSB");
139 public static final x86 CMPSD = _op(0xA7, 1, -1, -1, "CMPSD");
140 public static final x86 CMPXCHG_8 = _op(0x0FB000, 3, -1, -1, "CMPXCHG_8");
141 public static final x86 CMPXCHG_32 = _op(0x0FB100, 3, -1, -1, "CMPXCHG_32");
142 public static final x86 CMPXCHG8B = _op(0x0FC708, 3, -1, -1, "CMPXCHG8B");
143 public static final x86 CPUID = _op(0x0FA2, 2, -1, -1, "CPUID");
144 public static final x86 CWD = _op(0x99, 1, -1, -1, "CWD");
145 public static final x86 DAA = _op(0x27, 1, -1, -1, "DAA");
146 public static final x86 DAS = _op(0x2F, 1, -1, -1, "DAS");
147 public static final x86 DEC_r8 = _op(0xFE08, 2, -1, -1, "DEC_r8");
148 public static final x86 DEC_r32 = _op(0x48, 1, -1, -1, "DEC_r32");
149 public static final x86 DEC_m8 = _op(0xFE08, 2, -1, -1, "DEC_m8");
150 public static final x86 DEC_m32 = _op(0xFF08, 2, -1, -1, "DEC_m32");
151 public static final x86 DIV_r8 = _op(0xF630, 2, -1, -1, "DIV_r8");
152 public static final x86 DIV_r32 = _op(0xF730, 2, -1, -1, "DIV_r32");
153 public static final x86 DIV_m8 = _op(0xF630, 2, -1, -1, "DIV_m8");
154 public static final x86 DIV_m32 = _op(0xF730, 2, -1, -1, "DIV_m32");
155 public static final x86 ENTER = _op(0xC8, 1, -1, -1, "ENTER");
156 public static final x86 EMMS = _op(0x0F77, 2, -1, -1, "EMMS");
157 public static final x86 F2XM1 = _op(0xD9F0, 2, -1, -1, "F2XM1");
158 public static final x86 FABS = _op(0xD9E1, 2, -1, -1, "FABS");
159 public static final x86 FADD_m32 = _op(0xD800, 2, -1, -1, "FADD_m32");
160 public static final x86 FADD_m64 = _op(0xDC00, 2, -1, -1, "FADD_m64");
161 public static final x86 FADD_s0_si = _op(0xD8C0, 2, -1, -1, "FADD_s0_si");
162 public static final x86 FADD_si_s0 = _op(0xDCC0, 2, -1, -1, "FADD_si_s0");
163 public static final x86 FADDP_si_s0 = _op(0xDEC0, 2, -1, -1, "FADDP_si_s0");
164 public static final x86 FIADD_m16 = _op(0xDE00, 2, -1, -1, "FIADD_m16");
165 public static final x86 FIADD_m32 = _op(0xDA00, 2, -1, -1, "FIADD_m32");
166 public static final x86 FBLD = _op(0xDF20, 2, -1, -1, "FBLD");
167 public static final x86 FBSTP = _op(0xDF30, 2, -1, -1, "FBSTP");
168 public static final x86 FCHS = _op(0xD9E0, 2, -1, -1, "FCHS");
169 public static final x86 FCLEX = _op(0x9BDBE2, 3, -1, -1, "FCLEX");
170 public static final x86 FNCLEX = _op(0xDBE2, 2, -1, -1, "FNCLEX");
171 public static final x86 FCMOVB = _op(0xDAC0, 2, -1, -1, "FCMOVB");
172 public static final x86 FCMOVE = _op(0xDAC8, 2, -1, -1, "FCMOVE");
173 public static final x86 FCMOVBE = _op(0xDAD0, 2, -1, -1, "FCMOVBE");
174 public static final x86 FCMOVU = _op(0xDAD8, 2, -1, -1, "FCMOVU");
175 public static final x86 FCMOVNB = _op(0xDBC0, 2, -1, -1, "FCMOVNB");
176 public static final x86 FCMOVNE = _op(0xDBC8, 2, -1, -1, "FCMOVNE");
177 public static final x86 FCMOVNBE = _op(0xDBD0, 2, -1, -1, "FCMOVNBE");
178 public static final x86 FCMOVNU = _op(0xDBD8, 2, -1, -1, "FCMOVNU");
179 public static final x86 FCOM_m32 = _op(0xD810, 2, -1, -1, "FCOM_m32");
180 public static final x86 FCOM_m64 = _op(0xDC10, 2, -1, -1, "FCOM_m64");
181 public static final x86 FCOM_si = _op(0xD8D0, 2, -1, -1, "FCOM_si");
182 public static final x86 FCOMP_m32 = _op(0xD818, 2, -1, -1, "FCOMP_m32");
183 public static final x86 FCOMP_m64 = _op(0xDC18, 2, -1, -1, "FCOMP_m64");
184 public static final x86 FCOMP_si = _op(0xD8D8, 2, -1, -1, "FCOMP_si");
185 public static final x86 FCOMPP = _op(0xDED9, 2, -1, -1, "FCOMPP");
186 public static final x86 FCOMI = _op(0xDBF0, 2, -1, -1, "FCOMI");
187 public static final x86 FCOMIP = _op(0xDFF0, 2, -1, -1, "FCOMIP");
188 public static final x86 FUCOMI = _op(0xDBE8, 2, -1, -1, "FUCOMI");
189 public static final x86 FUCOMIP = _op(0xDFE8, 2, -1, -1, "FUCOMIP");
190 public static final x86 FCOS = _op(0xD9FF, 2, -1, -1, "FCOS");
191 public static final x86 FDECSTP = _op(0xD9F6, 2, -1, -1, "FDECSTP");
192 public static final x86 FDIV_m32 = _op(0xD830, 2, -1, -1, "FDIV_m32");
193 public static final x86 FDIV_m64 = _op(0xDC30, 2, -1, -1, "FDIV_m64");
194 public static final x86 FDIV_s0_si = _op(0xD8F0, 2, -1, -1, "FDIV_s0_si");
195 public static final x86 FDIV_si_s0 = _op(0xDCF8, 2, -1, -1, "FDIV_si_s0");
196 public static final x86 FDIVP_si_s0 = _op(0xDEF8, 2, -1, -1, "FDIVP_si_s0");
197 public static final x86 FIDIV_m16 = _op(0xDE30, 2, -1, -1, "FIDIV_m16");
198 public static final x86 FIDIV_m32 = _op(0xDA30, 2, -1, -1, "FIDIV_m32");
199 public static final x86 FDIVR_m32 = _op(0xD838, 2, -1, -1, "FDIVR_m32");
200 public static final x86 FDIVR_m64 = _op(0xDC38, 2, -1, -1, "FDIVR_m64");
201 public static final x86 FDIVR_s0_si = _op(0xD8F8, 2, -1, -1, "FDIVR_s0_si");
202 public static final x86 FDIVR_si_s0 = _op(0xDCF0, 2, -1, -1, "FDIVR_si_s0");
203 public static final x86 FDIVRP_si_s0 = _op(0xDEF0, 2, -1, -1, "FDIVRP_si_s0");
204 public static final x86 FIDIVR_m16 = _op(0xDE38, 2, -1, -1, "FIDIVR_m16");
205 public static final x86 FIDIVR_m32 = _op(0xDA38, 2, -1, -1, "FIDIVR_m32");
206 public static final x86 FFREE = _op(0xDDC0, 2, -1, -1, "FFREE");
207 public static final x86 FICOM_m16 = _op(0xDE10, 2, -1, -1, "FICOM_m16");
208 public static final x86 FICOM_m32 = _op(0xDA10, 2, -1, -1, "FICOM_m32");
209 public static final x86 FICOMP_m16 = _op(0xDE18, 2, -1, -1, "FICOMP_m16");
210 public static final x86 FICOMP_m32 = _op(0xDA18, 2, -1, -1, "FICOMP_m32");
211 public static final x86 FILD_m16 = _op(0xDF00, 2, -1, -1, "FILD_m16");
212 public static final x86 FILD_m32 = _op(0xDB00, 2, -1, -1, "FILD_m32");
213 public static final x86 FILD_m64 = _op(0xDF28, 2, -1, -1, "FILD_m64");
214 public static final x86 FINCSTP = _op(0xD9F7, 2, -1, -1, "FINCSTP");
215 public static final x86 FINIT = _op(0x9BDBE3, 3, -1, -1, "FINIT");
216 public static final x86 FNINIT = _op(0xDBE3, 2, -1, -1, "FNINIT");
217 public static final x86 FIST_m16 = _op(0xDF10, 2, -1, -1, "FIST_m16");
218 public static final x86 FIST_m32 = _op(0xDB10, 2, -1, -1, "FIST_m32");
219 public static final x86 FISTP_m16 = _op(0xDF18, 2, -1, -1, "FISTP_m16");
220 public static final x86 FISTP_m32 = _op(0xDB18, 2, -1, -1, "FISTP_m32");
221 public static final x86 FISTP_m64 = _op(0xDF38, 2, -1, -1, "FISTP_m64");
222 public static final x86 FLD_m32 = _op(0xD900, 2, -1, -1, "FLD_m32");
223 public static final x86 FLD_m64 = _op(0xDD00, 2, -1, -1, "FLD_m64");
224 public static final x86 FLD_m80 = _op(0xDB28, 2, -1, -1, "FLD_m80");
225 public static final x86 FLD1 = _op(0xD9E8, 2, -1, -1, "FLD1");
226 public static final x86 FLDL2T = _op(0xD9E9, 2, -1, -1, "FLDL2T");
227 public static final x86 FLDL2E = _op(0xD9EA, 2, -1, -1, "FLDL2E");
228 public static final x86 FLDPI = _op(0xD9EB, 2, -1, -1, "FLDPI");
229 public static final x86 FLDLG2 = _op(0xD9EC, 2, -1, -1, "FLDLG2");
230 public static final x86 FLDLN2 = _op(0xD9ED, 2, -1, -1, "FLDLN2");
231 public static final x86 FLDZ = _op(0xD9EE, 2, -1, -1, "FLDZ");
232 public static final x86 FLDCW = _op(0xD928, 2, -1, -1, "FLDCW");
233 public static final x86 FLDENV = _op(0xD920, 2, -1, -1, "FLDENV");
234 public static final x86 FMUL_m32 = _op(0xD808, 2, -1, -1, "FMUL_m32");
235 public static final x86 FMUL_m64 = _op(0xDC08, 2, -1, -1, "FMUL_m64");
236 public static final x86 FMUL_s0_si = _op(0xD8C8, 2, -1, -1, "FMUL_s0_si");
237 public static final x86 FMUL_si_s0 = _op(0xDCC8, 2, -1, -1, "FMUL_si_s0");
238 public static final x86 FMULP_si_s0 = _op(0xDEC8, 2, -1, -1, "FMULP_si_s0");
239 public static final x86 FIMUL_m16 = _op(0xDE08, 2, -1, -1, "FIMUL_m16");
240 public static final x86 FIMUL_m32 = _op(0xDA08, 2, -1, -1, "FIMUL_m32");
241 public static final x86 FNOP = _op(0xD9D0, 2, -1, -1, "FNOP");
242 public static final x86 FPATAN = _op(0xD9F3, 2, -1, -1, "FPATAN");
243 public static final x86 FPREM = _op(0xD9F8, 2, -1, -1, "FPREM");
244 public static final x86 FPREM1 = _op(0xD9F5, 2, -1, -1, "FPREM1");
245 public static final x86 FPTAN = _op(0xD9F2, 2, -1, -1, "FPTAN");
246 public static final x86 FRNDINT = _op(0xD9FC, 2, -1, -1, "FRNDINT");
247 public static final x86 FRSTOR = _op(0xDD20, 2, -1, -1, "FRSTOR");
248 public static final x86 FSAVE = _op(0x9BDD30, 3, -1, -1, "FSAVE");
249 public static final x86 FNSAVE = _op(0xDD30, 2, -1, -1, "FNSAVE");
250 public static final x86 FSCALE = _op(0xD9FD, 2, -1, -1, "FSCALE");
251 public static final x86 FSIN = _op(0xD9FE, 2, -1, -1, "FSIN");
252 public static final x86 FSINCOS = _op(0xD9FB, 2, -1, -1, "FSINCOS");
253 public static final x86 FSQRT = _op(0xD9FA, 2, -1, -1, "FSQRT");
254 public static final x86 FST_m32 = _op(0xD910, 2, -1, -1, "FST_m32");
255 public static final x86 FST_m64 = _op(0xDD10, 2, -1, -1, "FST_m64");
256 public static final x86 FST_si = _op(0xDDD0, 2, -1, -1, "FST_si");
257 public static final x86 FSTP_m32 = _op(0xD918, 2, -1, -1, "FSTP_m32");
258 public static final x86 FSTP_m64 = _op(0xDD18, 2, -1, -1, "FSTP_m64");
259 public static final x86 FSTP_m80 = _op(0xDB38, 2, -1, -1, "FSTP_m80");
260 public static final x86 FSTP_si = _op(0xDDD8, 2, -1, -1, "FSTP_si");
261 public static final x86 FSTCW = _op(0x9BD938, 3, -1, -1, "FSTCW");
262 public static final x86 FNSTCW = _op(0xD938, 2, -1, -1, "FNSTCW");
263 public static final x86 FSTENV = _op(0x9BD930, 3, -1, -1, "FSTENV");
264 public static final x86 FNSTENV = _op(0xD930, 2, -1, -1, "FNSTENV");
265 public static final x86 FSTSW_m = _op(0x9BDD38, 3, -1, -1, "FSTSW_m");
266 public static final x86 FSTSW_ax = _op(0x9BDFE0, 3, -1, -1, "FSTSW_ax");
267 public static final x86 FNSTSW_m = _op(0xDD38, 2, -1, -1, "FNSTSW_m");
268 public static final x86 FNSTSW_ax = _op(0xDFE0, 2, -1, -1, "FNSTSW_ax");
269 public static final x86 FSUB_m32 = _op(0xD820, 2, -1, -1, "FSUB_m32");
270 public static final x86 FSUB_m64 = _op(0xDC20, 2, -1, -1, "FSUB_m64");
271 public static final x86 FSUB_s0_si = _op(0xD8E0, 2, -1, -1, "FSUB_s0_si");
272 public static final x86 FSUB_si_s0 = _op(0xDCE8, 2, -1, -1, "FSUB_si_s0");
273 public static final x86 FSUBP_si_s0 = _op(0xDEE8, 2, -1, -1, "FSUBP_si_s0");
274 public static final x86 FISUB_m16 = _op(0xDE20, 2, -1, -1, "FISUB_m16");
275 public static final x86 FISUB_m32 = _op(0xDA20, 2, -1, -1, "FISUB_m32");
276 public static final x86 FSUBR_m32 = _op(0xD828, 2, -1, -1, "FSUBR_m32");
277 public static final x86 FSUBR_m64 = _op(0xDC28, 2, -1, -1, "FSUBR_m64");
278 public static final x86 FSUBR_s0_si = _op(0xD8E8, 2, -1, -1, "FSUBR_s0_si");
279 public static final x86 FSUBR_si_s0 = _op(0xDCE0, 2, -1, -1, "FSUBR_si_s0");
280 public static final x86 FSUBRP_si_s0 = _op(0xDEE0, 2, -1, -1, "FSUBRP_si_s0");
281 public static final x86 FISUBR_m16 = _op(0xDE28, 2, -1, -1, "FISUBR_m16");
282 public static final x86 FISUBR_m32 = _op(0xDA28, 2, -1, -1, "FISUBR_m32");
283 public static final x86 FTST = _op(0xD9E4, 2, -1, -1, "FTST");
284 public static final x86 FUCOM_si = _op(0xDDE0, 2, -1, -1, "FUCOM_si");
285 public static final x86 FUCOMP_si = _op(0xDDE8, 2, -1, -1, "FUCOMP_si");
286 public static final x86 FUCOMPP = _op(0xDAE9, 2, -1, -1, "FUCOMPP");
287 public static final x86 FXAM = _op(0xD9E5, 2, -1, -1, "FXAM");
288 public static final x86 FXCH_si = _op(0xD9C8, 2, -1, -1, "FXCH_si");
289 public static final x86 FXTRACT = _op(0xD9F4, 2, -1, -1, "FXTRACT");
290 public static final x86 FYL2X = _op(0xD9F1, 2, -1, -1, "FYL2X");
291 public static final x86 FYL2XP1 = _op(0xD9F9, 2, -1, -1, "FYL2XP1");
292 public static final x86 HLT = _op(0xF4, 1, -1, -1, "HLT");
293 public static final x86 IDIV_r8 = _op(0xF638, 2, -1, -1, "IDIV_r8");
294 public static final x86 IDIV_r32 = _op(0xF738, 2, -1, -1, "IDIV_r32");
295 public static final x86 IDIV_m8 = _op(0xF638, 2, -1, -1, "IDIV_m8");
296 public static final x86 IDIV_m32 = _op(0xF738, 2, -1, -1, "IDIV_m32");
297 public static final x86 IMUL_rda_r8 = _op(0xF628, 2, -1, -1, "IMUL_rda_r8");
298 public static final x86 IMUL_rda_r32 = _op(0xF728, 2, -1, -1, "IMUL_rda_r32");
299 public static final x86 IMUL_rda_m8 = _op(0xF628, 2, -1, -1, "IMUL_rda_m8");
300 public static final x86 IMUL_rda_m32 = _op(0xF728, 2, -1, -1, "IMUL_rda_m32");
301 public static final x86 IMUL_r_i8 = _op(0x6B00, 2, -1, -1, "IMUL_r_i8");
302 public static final x86 IMUL_r_i32 = _op(0x6900, 2, -1, -1, "IMUL_r_i32");
303 public static final x86 IMUL_r_r32 = _op(0x0FAF00, 3, -1, -1, "IMUL_r_r32");
304 public static final x86 IMUL_r_r32_i8 = _op(0x6B00, 2, -1, -1, "IMUL_r_r32_i8");
305 public static final x86 IMUL_r_r32_i32 = _op(0x6900, 2, -1, -1, "IMUL_r_r32_i32");
306 public static final x86 IMUL_r_m32 = _op(0x0FAF00, 3, -1, -1, "IMUL_r_m32");
307 public static final x86 IMUL_r_m32_i8 = _op(0x6B00, 2, -1, -1, "IMUL_r_m32_i8");
308 public static final x86 IMUL_r_m32_i32 = _op(0x6900, 2, -1, -1, "IMUL_r_m32_i32");
309 public static final x86 IN_imm8 = _op(0xE4, 1, -1, -1, "IN_imm8");
310 public static final x86 IN_ra8 = _op(0xEC, 1, -1, -1, "IN_ra8");
311 public static final x86 IN_ra32 = _op(0xED, 1, -1, -1, "IN_ra32");
312 public static final x86 INC_r8 = _op(0xFE00, 2, -1, -1, "INC_r8");
313 public static final x86 INC_m8 = _op(0xFE00, 2, -1, -1, "INC_m8");
314 public static final x86 INC_m32 = _op(0xFF00, 2, -1, -1, "INC_m32");
315 public static final x86 INC_r32 = _op(0x40, 1, -1, -1, "INC_r32");
316 public static final x86 INS_m8_rd = _op(0x6C, 1, -1, -1, "INS_m8_rd");
317 public static final x86 INS_m32_rd = _op(0x6D, 1, -1, -1, "INS_m32_rd");
318 public static final x86 INT_3 = _op(0xCC, 1, -1, -1, "INT_3");
319 public static final x86 INT_i8 = _op(0xCD, 1, -1, -1, "INT_i8");
320 public static final x86 INTO = _op(0xCE, 1, -1, -1, "INTO");
321 public static final x86 INVD = _op(0x0F08, 2, -1, -1, "INVD");
322 public static final x86 INVLPG = _op(0x0F0138, 3, -1, -1, "INVLPG");
323 public static final x86 IRET = _op(0xCF, 1, -1, -1, "IRET");
324 public static final x86 JO = _op(0x00, 1, -1, -1, "JO");
325 public static final x86 JNO = _op(0x01, 1, -1, -1, "JNO");
326 public static final x86 JB = _op(0x02, 1, -1, -1, "JB");
327 public static final x86 JAE = _op(0x03, 1, -1, -1, "JAE");
328 public static final x86 JE = _op(0x04, 1, -1, -1, "JE");
329 public static final x86 JNE = _op(0x05, 1, -1, -1, "JNE");
330 public static final x86 JBE = _op(0x06, 1, -1, -1, "JBE");
331 public static final x86 JA = _op(0x07, 1, -1, -1, "JA");
332 public static final x86 JS = _op(0x08, 1, -1, -1, "JS");
333 public static final x86 JNS = _op(0x09, 1, -1, -1, "JNS");
334 public static final x86 JP = _op(0x0A, 1, -1, -1, "JP");
335 public static final x86 JNP = _op(0x0B, 1, -1, -1, "JNP");
336 public static final x86 JL = _op(0x0C, 1, -1, -1, "JL");
337 public static final x86 JGE = _op(0x0D, 1, -1, -1, "JGE");
338 public static final x86 JLE = _op(0x0E, 1, -1, -1, "JLE");
339 public static final x86 JG = _op(0x0F, 1, -1, -1, "JG");
340 public static final x86 JCXZ_8 = _op(0xE3, 1, -1, -1, "JCXZ_8");
341 public static final x86 JMP = _op(0xE0, 1, -1, -1, "JMP");
342 public static final x86 JMP_r = _op(0xFF20, 2, -1, -1, "JMP_r");
343 public static final x86 JMP_abs = _op(0xEA, 1, -1, -1, "JMP_abs");
344 public static final x86 JMP_m = _op(0xFF20, 2, -1, -1, "JMP_m");
345 public static final x86 LAHF = _op(0x9F, 1, -1, -1, "LAHF");
346 public static final x86 LAR_r_r = _op(0x0F0200, 3, -1, -1, "LAR_r_r");
347 public static final x86 LAR_r_m = _op(0x0F0200, 3, -1, -1, "LAR_r_m");
348 public static final x86 LDS = _op(0xC500, 2, -1, -1, "LDS");
349 public static final x86 LSS = _op(0x0FB200, 3, -1, -1, "LSS");
350 public static final x86 LES = _op(0xC400, 2, -1, -1, "LES");
351 public static final x86 LFS = _op(0x0FB400, 3, -1, -1, "LFS");
352 public static final x86 LGS = _op(0x0FB500, 3, -1, -1, "LGS");
353 public static final x86 LEA = _op(0x8D00, 2, -1, -1, "LEA");
354 public static final x86 LEAVE = _op(0xC9, 1, -1, -1, "LEAVE");
355 public static final x86 LGDT = _op(0x0F0110, 3, -1, -1, "LGDT");
356 public static final x86 LIDT = _op(0x0F0118, 3, -1, -1, "LIDT");
357 public static final x86 LLDT = _op(0x0F0010, 3, -1, -1, "LLDT");
358 public static final x86 LMSW = _op(0x0F0130, 3, -1, -1, "LMSW");
359 public static final x86 LOCK = _op(0xF0, 1, -1, -1, "LOCK");
360 public static final x86 LODS_m8 = _op(0xAC, 1, -1, -1, "LODS_m8");
361 public static final x86 LODS_m32 = _op(0xAD, 1, -1, -1, "LODS_m32");
362 public static final x86 LOOP = _op(0xE2, 1, -1, -1, "LOOP");
363 public static final x86 LOOPE = _op(0xE1, 1, -1, -1, "LOOPE");
364 public static final x86 LOOPNE = _op(0xE0, 1, -1, -1, "LOOPNE");
365 public static final x86 LSL_r_r = _op(0x0F0300, 3, -1, -1, "LSL_r_r");
366 public static final x86 LSL_r_m = _op(0x0F0300, 3, -1, -1, "LSL_r_m");
367 public static final x86 LTR_r = _op(0x0F0018, 3, -1, -1, "LTR_r");
368 public static final x86 LTR_m = _op(0x0F0018, 3, -1, -1, "LTR_m");
369 public static final x86 MOV_r_m8 = _op(0x8A00, 2, -1, -1, "MOV_r_m8");
370 public static final x86 MOV_r_m32 = _op(0x8B00, 2, -1, -1, "MOV_r_m32");
371 public static final x86 MOV_r_r8 = _op(0x8A00, 2, -1, -1, "MOV_r_r8");
372 public static final x86 MOV_r_r32 = _op(0x8B00, 2, -1, -1, "MOV_r_r32");
373 public static final x86 MOV_m_r8 = _op(0x8800, 2, -1, -1, "MOV_m_r8");
374 public static final x86 MOV_m_r32 = _op(0x8900, 2, -1, -1, "MOV_m_r32");
375 public static final x86 MOV_r_sr = _op(0x8C00, 2, -1, -1, "MOV_r_sr");
376 public static final x86 MOV_m_sr = _op(0x8C00, 2, -1, -1, "MOV_m_sr");
377 public static final x86 MOV_sr_r = _op(0x8E00, 2, -1, -1, "MOV_sr_r");
378 public static final x86 MOV_sr_m = _op(0x8E00, 2, -1, -1, "MOV_sr_m");
379 public static final x86 MOV_ra_mo8 = _op(0xA0, 1, -1, -1, "MOV_ra_mo8");
380 public static final x86 MOV_ra_mo32 = _op(0xA1, 1, -1, -1, "MOV_ra_mo32");
381 public static final x86 MOV_mo8_ra = _op(0xA2, 1, -1, -1, "MOV_mo8_ra");
382 public static final x86 MOV_mo32_ra = _op(0xA3, 1, -1, -1, "MOV_mo32_ra");
383 public static final x86 MOV_r_i8 = _op(0xB0, 1, -1, -1, "MOV_r_i8");
384 public static final x86 MOV_r_i32 = _op(0xB8, 1, -1, -1, "MOV_r_i32");
385 public static final x86 MOV_m_i8 = _op(0xC600, 2, -1, -1, "MOV_m_i8");
386 public static final x86 MOV_m_i32 = _op(0xC700, 2, -1, -1, "MOV_m_i32");
387 public static final x86 MOV_cr_r = _op(0x0F2200, 3, -1, -1, "MOV_cr_r");
388 public static final x86 MOV_r_cr = _op(0x0F2000, 3, -1, -1, "MOV_r_cr");
389 public static final x86 MOV_r_dr = _op(0x0F2100, 3, -1, -1, "MOV_r_dr");
390 public static final x86 MOV_dr_r = _op(0x0F2300, 3, -1, -1, "MOV_dr_r");
391 public static final x86 MOVD_mm_r = _op(0x0F6E00, 3, -1, -1, "MOVD_mm_r");
392 public static final x86 MOVD_mm_m = _op(0x0F6E00, 3, -1, -1, "MOVD_mm_m");
393 public static final x86 MOVD_r_mm = _op(0x0F7E00, 3, -1, -1, "MOVD_r_mm");
394 public static final x86 MOVD_m_mm = _op(0x0F7E00, 3, -1, -1, "MOVD_m_mm");
395 public static final x86 MOVQ_mm_mm = _op(0x0F6F00, 3, -1, -1, "MOVQ_mm_mm");
396 public static final x86 MOVQ_mm_m = _op(0x0F6F00, 3, -1, -1, "MOVQ_mm_m");
397 public static final x86 MOVQ_m_mm = _op(0x0F7F00, 3, -1, -1, "MOVQ_m_mm");
398 public static final x86 MOVS_8 = _op(0xA4, 1, -1, -1, "MOVS_8");
399 public static final x86 MOVS_32 = _op(0xA5, 1, -1, -1, "MOVS_32");
400 public static final x86 MOVSX_r_r8 = _op(0x0FBE00, 3, -1, -1, "MOVSX_r_r8");
401 public static final x86 MOVSX_r_m8 = _op(0x0FBE00, 3, -1, -1, "MOVSX_r_m8");
402 public static final x86 MOVSX_r_r16 = _op(0x0FBF00, 3, -1, -1, "MOVSX_r_r16");
403 public static final x86 MOVSX_r_m16 = _op(0x0FBF00, 3, -1, -1, "MOVSX_r_m16");
404 public static final x86 MOVZX_r_r8 = _op(0x0FB600, 3, -1, -1, "MOVZX_r_r8");
405 public static final x86 MOVZX_r_m8 = _op(0x0FB600, 3, -1, -1, "MOVZX_r_m8");
406 public static final x86 MOVZX_r_r16 = _op(0x0FB700, 3, -1, -1, "MOVZX_r_r16");
407 public static final x86 MOVZX_r_m16 = _op(0x0FB700, 3, -1, -1, "MOVZX_r_m16");
408 public static final x86 MUL_rda_r8 = _op(0xF620, 2, -1, -1, "MUL_rda_r8");
409 public static final x86 MUL_rda_r32 = _op(0xF720, 2, -1, -1, "MUL_rda_r32");
410 public static final x86 MUL_rda_m8 = _op(0xF620, 2, -1, -1, "MUL_rda_m8");
411 public static final x86 MUL_rda_m32 = _op(0xF720, 2, -1, -1, "MUL_rda_m32");
412 public static final x86 NEG_r8 = _op(0xF618, 2, -1, -1, "NEG_r8");
413 public static final x86 NEG_m8 = _op(0xF618, 2, -1, -1, "NEG_m8");
414 public static final x86 NEG_r32 = _op(0xF718, 2, -1, -1, "NEG_r32");
415 public static final x86 NEG_m32 = _op(0xF718, 2, -1, -1, "NEG_m32");
416 public static final x86 NOP = _op(0x90, 1, -1, -1, "NOP");
417 public static final x86 NOT_r8 = _op(0xF610, 2, -1, -1, "NOT_r8");
418 public static final x86 NOT_m8 = _op(0xF610, 2, -1, -1, "NOT_m8");
419 public static final x86 NOT_r32 = _op(0xF710, 2, -1, -1, "NOT_r32");
420 public static final x86 NOT_m32 = _op(0xF710, 2, -1, -1, "NOT_m32");
421 public static final x86 OR_ra_i8 = _op(0x0C, 1, UV, 1, "OR_ra_i8");
422 public static final x86 OR_ra_i32 = _op(0x0D, 1, UV, 1, "OR_ra_i32");
423 public static final x86 OR_r_i8 = _op(0x8008, 2, UV, 1, "OR_r_i8");
424 public static final x86 OR_r_i32 = _op(0x8108, 2, UV, 1, "OR_r_i32");
425 public static final x86 OR_m_i8 = _op(0x8008, 2, UV, 4, "OR_m_i8");
426 public static final x86 OR_m_i32 = _op(0x8108, 2, UV, 4, "OR_m_i32");
427 public static final x86 OR_r_m8 = _op(0x0A00, 2, UV, 2, "OR_r_m8");
428 public static final x86 OR_r_m32 = _op(0x0B00, 2, UV, 2, "OR_r_m32");
429 public static final x86 OR_m_r8 = _op(0x0800, 2, UV, 4, "OR_m_r8");
430 public static final x86 OR_m_r32 = _op(0x0900, 2, UV, 4, "OR_m_r32");
431 public static final x86 OR_r_r8 = _op(0x0A00, 2, UV, 1, "OR_r_r8");
432 public static final x86 OR_r_r32 = _op(0x0B00, 2, UV, 1, "OR_r_r32");
433 public static final x86 OUT_i8_ra8 = _op(0xE6, 1, -1, -1, "OUT_i8_ra8");
434 public static final x86 OUT_i8_ra32 = _op(0xE7, 1, -1, -1, "OUT_i8_ra32");
435 public static final x86 OUT_rd_ra8 = _op(0xEE, 1, -1, -1, "OUT_rd_ra8");
436 public static final x86 OUT_rd_ra32 = _op(0xEF, 1, -1, -1, "OUT_rd_ra32");
437 public static final x86 OUTS_rd_m8 = _op(0x6E, 1, -1, -1, "OUTS_rd_m8");
438 public static final x86 OUTS_rd_m32 = _op(0x6F, 1, -1, -1, "OUTS_rd_m32");
439 public static final x86 PACKSSWB_mm_mm = _op(0x0F6300, 3, -1, -1, "PACKSSWB_mm_mm");
440 public static final x86 PACKSSWB_mm_m = _op(0x0F6300, 3, -1, -1, "PACKSSWB_mm_m");
441 public static final x86 PACKSSDW_mm_mm = _op(0x0F6B00, 3, -1, -1, "PACKSSDW_mm_mm");
442 public static final x86 PACKSSDW_mm_m = _op(0x0F6B00, 3, -1, -1, "PACKSSDW_mm_m");
443 public static final x86 PACKUSWB_mm_mm = _op(0x0F6700, 3, -1, -1, "PACKUSWB_mm_mm");
444 public static final x86 PACKUSWB_mm_m = _op(0x0F6700, 3, -1, -1, "PACKUSWB_mm_m");
445 public static final x86 PADDB_mm_mm = _op(0x0FFC00, 3, -1, -1, "PADDB_mm_mm");
446 public static final x86 PADDW_mm_mm = _op(0x0FFD00, 3, -1, -1, "PADDW_mm_mm");
447 public static final x86 PADDD_mm_mm = _op(0x0FFE00, 3, -1, -1, "PADDD_mm_mm");
448 public static final x86 PADDB_mm_m = _op(0x0FFC00, 3, -1, -1, "PADDB_mm_m");
449 public static final x86 PADDW_mm_m = _op(0x0FFD00, 3, -1, -1, "PADDW_mm_m");
450 public static final x86 PADDD_mm_m = _op(0x0FFE00, 3, -1, -1, "PADDD_mm_m");
451 public static final x86 PADDSB_mm_mm = _op(0x0FEC00, 3, -1, -1, "PADDSB_mm_mm");
452 public static final x86 PADDSW_mm_mm = _op(0x0FED00, 3, -1, -1, "PADDSW_mm_mm");
453 public static final x86 PADDSB_mm_m = _op(0x0FEC00, 3, -1, -1, "PADDSB_mm_m");
454 public static final x86 PADDSW_mm_m = _op(0x0FED00, 3, -1, -1, "PADDSW_mm_m");
455 public static final x86 PADDUSB_mm_mm = _op(0x0FDC00, 3, -1, -1, "PADDUSB_mm_mm");
456 public static final x86 PADDUSW_mm_mm = _op(0x0FDD00, 3, -1, -1, "PADDUSW_mm_mm");
457 public static final x86 PADDUSB_mm_m = _op(0x0FDC00, 3, -1, -1, "PADDUSB_mm_m");
458 public static final x86 PADDUSW_mm_m = _op(0x0FDD00, 3, -1, -1, "PADDUSW_mm_m");
459 public static final x86 PAND_mm_mm = _op(0x0FDB00, 3, -1, -1, "PAND_mm_mm");
460 public static final x86 PAND_mm_m = _op(0x0FDB00, 3, -1, -1, "PAND_mm_m");
461 public static final x86 PANDN_mm_mm = _op(0x0FDF00, 3, -1, -1, "PANDN_mm_mm");
462 public static final x86 PANDN_mm_m = _op(0x0FDF00, 3, -1, -1, "PANDN_mm_m");
463 public static final x86 PCMPEQB_mm_mm = _op(0x0F7400, 3, -1, -1, "PCMPEQB_mm_mm");
464 public static final x86 PCMPEQW_mm_mm = _op(0x0F7500, 3, -1, -1, "PCMPEQW_mm_mm");
465 public static final x86 PCMPEQD_mm_mm = _op(0x0F7600, 3, -1, -1, "PCMPEQD_mm_mm");
466 public static final x86 PCMPEQB_mm_m = _op(0x0F7400, 3, -1, -1, "PCMPEQB_mm_m");
467 public static final x86 PCMPEQW_mm_m = _op(0x0F7500, 3, -1, -1, "PCMPEQW_mm_m");
468 public static final x86 PCMPEQD_mm_m = _op(0x0F7600, 3, -1, -1, "PCMPEQD_mm_m");
469 public static final x86 PCMPGTB_mm_mm = _op(0x0F6400, 3, -1, -1, "PCMPGTB_mm_mm");
470 public static final x86 PCMPGTW_mm_mm = _op(0x0F6500, 3, -1, -1, "PCMPGTW_mm_mm");
471 public static final x86 PCMPGTD_mm_mm = _op(0x0F6600, 3, -1, -1, "PCMPGTD_mm_mm");
472 public static final x86 PCMPGTB_mm_m = _op(0x0F6400, 3, -1, -1, "PCMPGTB_mm_m");
473 public static final x86 PCMPGTW_mm_m = _op(0x0F6500, 3, -1, -1, "PCMPGTW_mm_m");
474 public static final x86 PCMPGTD_mm_m = _op(0x0F6600, 3, -1, -1, "PCMPGTD_mm_m");
475 public static final x86 PMADDWD_mm_mm = _op(0x0FF500, 3, -1, -1, "PMADDWD_mm_mm");
476 public static final x86 PMADDWD_mm_m = _op(0x0FF500, 3, -1, -1, "PMADDWD_mm_m");
477 public static final x86 PMULHW_mm_mm = _op(0x0FE500, 3, -1, -1, "PMULHW_mm_mm");
478 public static final x86 PMULHW_mm_m = _op(0x0FE500, 3, -1, -1, "PMULHW_mm_m");
479 public static final x86 PMULLW_mm_mm = _op(0x0FD500, 3, -1, -1, "PMULLW_mm_mm");
480 public static final x86 PMULLW_mm_m = _op(0x0FD500, 3, -1, -1, "PMULLW_mm_m");
481 public static final x86 POP_r = _op(0x58, 1, UV, 2, "POP_r");
482 public static final x86 POP_m = _op(0x8F00, 2, NP, COMPLEX, "POP_m");
483 public static final x86 POP_ds = _op(0x1F, 1, -1, -1, "POP_ds");
484 public static final x86 POP_es = _op(0x07, 1, -1, -1, "POP_es");
485 public static final x86 POP_ss = _op(0x17, 1, -1, -1, "POP_ss");
486 public static final x86 POP_fs = _op(0x0FA1, 2, -1, -1, "POP_fs");
487 public static final x86 POP_gs = _op(0x0FA9, 2, -1, -1, "POP_gs");
488 public static final x86 POPA = _op(0x61, 1, -1, -1, "POPA");
489 public static final x86 POPF = _op(0x9D, 1, -1, -1, "POPF");
490 public static final x86 POR_mm_mm = _op(0x0FEB00, 3, -1, -1, "POR_mm_mm");
491 public static final x86 POR_mm_m = _op(0x0FEB00, 3, -1, -1, "POR_mm_m");
492 public static final x86 PSLLW_mm_mm = _op(0x0FF100, 3, -1, -1, "PSLLW_mm_mm");
493 public static final x86 PSLLD_mm_mm = _op(0x0FF200, 3, -1, -1, "PSLLD_mm_mm");
494 public static final x86 PSLLQ_mm_mm = _op(0x0FF300, 3, -1, -1, "PSLLQ_mm_mm");
495 public static final x86 PSLLW_mm_m = _op(0x0FF100, 3, -1, -1, "PSLLW_mm_m");
496 public static final x86 PSLLD_mm_m = _op(0x0FF200, 3, -1, -1, "PSLLD_mm_m");
497 public static final x86 PSLLQ_mm_m = _op(0x0FF300, 3, -1, -1, "PSLLQ_mm_m");
498 public static final x86 PSLLW_mm_i = _op(0x0F7130, 3, -1, -1, "PSLLW_mm_i");
499 public static final x86 PSLLD_mm_i = _op(0x0F7230, 3, -1, -1, "PSLLD_mm_i");
500 public static final x86 PSLLQ_mm_i = _op(0x0F7330, 3, -1, -1, "PSLLQ_mm_i");
501 public static final x86 PSRAW_mm_mm = _op(0x0FE100, 3, -1, -1, "PSRAW_mm_mm");
502 public static final x86 PSRAW_mm_m = _op(0x0FE100, 3, -1, -1, "PSRAW_mm_m");
503 public static final x86 PSRAD_mm_mm = _op(0x0FE200, 3, -1, -1, "PSRAD_mm_mm");
504 public static final x86 PSRAD_mm_m = _op(0x0FE200, 3, -1, -1, "PSRAD_mm_m");
505 public static final x86 PSRAW_mm_i = _op(0x0F7120, 3, -1, -1, "PSRAW_mm_i");
506 public static final x86 PSRAD_mm_i = _op(0x0F7220, 3, -1, -1, "PSRAD_mm_i");
507 public static final x86 PSRLW_mm_mm = _op(0x0FD100, 3, -1, -1, "PSRLW_mm_mm");
508 public static final x86 PSRLW_mm_m = _op(0x0FD100, 3, -1, -1, "PSRLW_mm_m");
509 public static final x86 PSRLD_mm_mm = _op(0x0FD200, 3, -1, -1, "PSRLD_mm_mm");
510 public static final x86 PSRLD_mm_m = _op(0x0FD200, 3, -1, -1, "PSRLD_mm_m");
511 public static final x86 PSRLQ_mm_mm = _op(0x0FD300, 3, -1, -1, "PSRLQ_mm_mm");
512 public static final x86 PSRLQ_mm_m = _op(0x0FD300, 3, -1, -1, "PSRLQ_mm_m");
513 public static final x86 PSRLW_mm_i = _op(0x0F7110, 3, -1, -1, "PSRLW_mm_i");
514 public static final x86 PSRLD_mm_i = _op(0x0F7210, 3, -1, -1, "PSRLD_mm_i");
515 public static final x86 PSRLQ_mm_i = _op(0x0F7310, 3, -1, -1, "PSRLQ_mm_i");
516 public static final x86 PSUBB_mm_mm = _op(0x0FF800, 3, -1, -1, "PSUBB_mm_mm");
517 public static final x86 PSUBB_mm_m = _op(0x0FF800, 3, -1, -1, "PSUBB_mm_m");
518 public static final x86 PSUBW_mm_mm = _op(0x0FF900, 3, -1, -1, "PSUBW_mm_mm");
519 public static final x86 PSUBW_mm_m = _op(0x0FF900, 3, -1, -1, "PSUBW_mm_m");
520 public static final x86 PSUBD_mm_mm = _op(0x0FFA00, 3, -1, -1, "PSUBD_mm_mm");
521 public static final x86 PSUBD_mm_m = _op(0x0FFA00, 3, -1, -1, "PSUBD_mm_m");
522 public static final x86 PSUBSB_mm_mm = _op(0x0FE800, 3, -1, -1, "PSUBSB_mm_mm");
523 public static final x86 PSUBSB_mm_m = _op(0x0FE800, 3, -1, -1, "PSUBSB_mm_m");
524 public static final x86 PSUBSW_mm_mm = _op(0x0FE900, 3, -1, -1, "PSUBSW_mm_mm");
525 public static final x86 PSUBSW_mm_m = _op(0x0FE900, 3, -1, -1, "PSUBSW_mm_m");
526 public static final x86 PSUBUSB_mm_mm = _op(0x0FD800, 3, -1, -1, "PSUBUSB_mm_mm");
527 public static final x86 PSUBUSB_mm_m = _op(0x0FD800, 3, -1, -1, "PSUBUSB_mm_m");
528 public static final x86 PSUBUSW_mm_mm = _op(0x0FD900, 3, -1, -1, "PSUBUSW_mm_mm");
529 public static final x86 PSUBUSW_mm_m = _op(0x0FD900, 3, -1, -1, "PSUBUSW_mm_m");
530 public static final x86 PUNPCKHBW_mm_mm = _op(0x0F6800, 3, -1, -1, "PUNPCKHBW_mm_mm");
531 public static final x86 PUNPCKHWD_mm_mm = _op(0x0F6900, 3, -1, -1, "PUNPCKHWD_mm_mm");
532 public static final x86 PUNPCKHDQ_mm_mm = _op(0x0F6A00, 3, -1, -1, "PUNPCKHDQ_mm_mm");
533 public static final x86 PUNPCKHBW_mm_m = _op(0x0F6800, 3, -1, -1, "PUNPCKHBW_mm_m");
534 public static final x86 PUNPCKHWD_mm_m = _op(0x0F6900, 3, -1, -1, "PUNPCKHWD_mm_m");
535 public static final x86 PUNPCKHDQ_mm_m = _op(0x0F6A00, 3, -1, -1, "PUNPCKHDQ_mm_m");
536 public static final x86 PUNPCKLBW_mm_mm = _op(0x0F6000, 3, -1, -1, "PUNPCKLBW_mm_mm");
537 public static final x86 PUNPCKLWD_mm_mm = _op(0x0F6100, 3, -1, -1, "PUNPCKLWD_mm_mm");
538 public static final x86 PUNPCKLDQ_mm_mm = _op(0x0F6200, 3, -1, -1, "PUNPCKLDQ_mm_mm");
539 public static final x86 PUNPCKLBW_mm_m = _op(0x0F6000, 3, -1, -1, "PUNPCKLBW_mm_m");
540 public static final x86 PUNPCKLWD_mm_m = _op(0x0F6100, 3, -1, -1, "PUNPCKLWD_mm_m");
541 public static final x86 PUNPCKLDQ_mm_m = _op(0x0F6200, 3, -1, -1, "PUNPCKLDQ_mm_m");
542 public static final x86 PUSH_i8 = _op(0x6A, 1, -1, -1, "PUSH_i8");
543 public static final x86 PUSH_i32 = _op(0x68, 1, -1, -1, "PUSH_i32");
544 public static final x86 PUSH_r = _op(0x50, 1, UV, 3, "PUSH_r");
545 public static final x86 PUSH_m = _op(0xFF30, 2, NP, 4, "PUSH_m");
546 public static final x86 PUSH_cs = _op(0x0E, 1, -1, -1, "PUSH_cs");
547 public static final x86 PUSH_ss = _op(0x16, 1, -1, -1, "PUSH_ss");
548 public static final x86 PUSH_ds = _op(0x1E, 1, -1, -1, "PUSH_ds");
549 public static final x86 PUSH_es = _op(0x06, 1, -1, -1, "PUSH_es");
550 public static final x86 PUSH_fs = _op(0x0FA0, 2, -1, -1, "PUSH_fs");
551 public static final x86 PUSH_gs = _op(0x0FA8, 2, -1, -1, "PUSH_gs");
552 public static final x86 PUSHA = _op(0x60, 1, -1, -1, "PUSHA");
553 public static final x86 PUSHF = _op(0x9C, 1, -1, -1, "PUSHF");
554 public static final x86 PXOR_mm_mm = _op(0x0FEF00, 3, -1, -1, "PXOR_mm_mm");
555 public static final x86 PXOR_mm_m = _op(0x0FEF00, 3, -1, -1, "PXOR_mm_m");
556 public static final x86 ROL_r8_1 = _op(0xD000, 2, PU, 1, "ROL_r8_1");
557 public static final x86 ROL_m8_1 = _op(0xD000, 2, PU, 4, "ROL_m8_1");
558 public static final x86 ROL_r8_rc = _op(0xD200, 2, NP, 1, "ROL_r8_rc");
559 public static final x86 ROL_m8_rc = _op(0xD200, 2, NP, 4, "ROL_m8_rc");
560 public static final x86 ROL_r8_i = _op(0xC000, 2, PU, 1, "ROL_r8_i");
561 public static final x86 ROL_m8_i = _op(0xC000, 2, PU, 4, "ROL_m8_i");
562 public static final x86 ROR_r8_1 = _op(0xD008, 2, PU, 1, "ROR_r8_1");
563 public static final x86 ROR_m8_1 = _op(0xD008, 2, PU, 4, "ROR_m8_1");
564 public static final x86 ROR_r8_rc = _op(0xD208, 2, NP, 1, "ROR_r8_rc");
565 public static final x86 ROR_m8_rc = _op(0xD208, 2, NP, 4, "ROR_m8_rc");
566 public static final x86 ROR_r8_i = _op(0xC008, 2, PU, 1, "ROR_r8_i");
567 public static final x86 ROR_m8_i = _op(0xC008, 2, PU, 4, "ROR_m8_i");
568 public static final x86 RCL_r8_1 = _op(0xD010, 2, PU, 2, "RCL_r8_1");
569 public static final x86 RCL_m8_1 = _op(0xD010, 2, PU, 4, "RCL_m8_1");
570 public static final x86 RCL_r8_rc = _op(0xD210, 2, NP, COMPLEX, "RCL_r8_rc");
571 public static final x86 RCL_m8_rc = _op(0xD210, 2, NP, COMPLEX, "RCL_m8_rc");
572 public static final x86 RCL_r8_i = _op(0xC010, 2, PU, COMPLEX, "RCL_r8_i");
573 public static final x86 RCL_m8_i = _op(0xC010, 2, PU, COMPLEX, "RCL_m8_i");
574 public static final x86 RCR_r8_1 = _op(0xD018, 2, PU, 2, "RCR_r8_1");
575 public static final x86 RCR_m8_1 = _op(0xD018, 2, PU, 4, "RCR_m8_1");
576 public static final x86 RCR_r8_rc = _op(0xD218, 2, NP, COMPLEX, "RCR_r8_rc");
577 public static final x86 RCR_m8_rc = _op(0xD218, 2, NP, COMPLEX, "RCR_m8_rc");
578 public static final x86 RCR_r8_i = _op(0xC018, 2, PU, COMPLEX, "RCR_r8_i");
579 public static final x86 RCR_m8_i = _op(0xC018, 2, PU, COMPLEX, "RCR_m8_i");
580 public static final x86 ROL_r32_1 = _op(0xD100, 2, PU, 1, "ROL_r32_1");
581 public static final x86 ROL_m32_1 = _op(0xD100, 2, PU, 4, "ROL_m32_1");
582 public static final x86 ROL_r32_rc = _op(0xD300, 2, NP, 1, "ROL_r32_rc");
583 public static final x86 ROL_m32_rc = _op(0xD300, 2, NP, 4, "ROL_m32_rc");
584 public static final x86 ROL_r32_i = _op(0xC100, 2, PU, 1, "ROL_r32_i");
585 public static final x86 ROL_m32_i = _op(0xC100, 2, PU, 4, "ROL_m32_i");
586 public static final x86 ROR_r32_1 = _op(0xD108, 2, PU, 1, "ROR_r32_1");
587 public static final x86 ROR_m32_1 = _op(0xD108, 2, PU, 4, "ROR_m32_1");
588 public static final x86 ROR_r32_rc = _op(0xD308, 2, NP, 1, "ROR_r32_rc");
589 public static final x86 ROR_m32_rc = _op(0xD308, 2, NP, 4, "ROR_m32_rc");
590 public static final x86 ROR_r32_i = _op(0xC108, 2, PU, 1, "ROR_r32_i");
591 public static final x86 ROR_m32_i = _op(0xC108, 2, PU, 4, "ROR_m32_i");
592 public static final x86 RCL_r32_1 = _op(0xD110, 2, PU, 2, "RCL_r32_1");
593 public static final x86 RCL_m32_1 = _op(0xD110, 2, PU, 4, "RCL_m32_1");
594 public static final x86 RCL_r32_rc = _op(0xD310, 2, NP, COMPLEX, "RCL_r32_rc");
595 public static final x86 RCL_m32_rc = _op(0xD310, 2, NP, COMPLEX, "RCL_m32_rc");
596 public static final x86 RCL_r32_i = _op(0xC110, 2, PU, COMPLEX, "RCL_r32_i");
597 public static final x86 RCL_m32_i = _op(0xC110, 2, PU, COMPLEX, "RCL_m32_i");
598 public static final x86 RCR_r32_1 = _op(0xD118, 2, PU, 2, "RCR_r32_1");
599 public static final x86 RCR_m32_1 = _op(0xD118, 2, PU, 4, "RCR_m32_1");
600 public static final x86 RCR_r32_rc = _op(0xD318, 2, NP, COMPLEX, "RCR_r32_rc");
601 public static final x86 RCR_m32_rc = _op(0xD318, 2, NP, COMPLEX, "RCR_m32_rc");
602 public static final x86 RCR_r32_i = _op(0xC118, 2, PU, COMPLEX, "RCR_r32_i");
603 public static final x86 RCR_m32_i = _op(0xC118, 2, PU, COMPLEX, "RCR_m32_i");
604 public static final x86 RDMSR = _op(0x0F32, 2, -1, -1, "RDMSR");
605 public static final x86 RDPMC = _op(0x0F33, 2, -1, -1, "RDPMC");
606 public static final x86 RDTSC = _op(0x0F31, 2, -1, -1, "RDTSC");
607 public static final x86 RET = _op(0xC3, 1, -1, -1, "RET");
608 public static final x86 RET_far = _op(0xCB, 1, -1, -1, "RET_far");
609 public static final x86 RET_i = _op(0xC2, 1, -1, -1, "RET_i");
610 public static final x86 RET_i_far = _op(0xCA, 1, -1, -1, "RET_i_far");
611 public static final x86 RSM = _op(0x0FAA, 2, -1, -1, "RSM");
612 public static final x86 SAHF = _op(0x9E, 1, -1, -1, "SAHF");
613 public static final x86 SHL_r8_1 = _op(0xD020, 2, PU, 1, "SHL_r8_1");
614 public static final x86 SHL_m8_1 = _op(0xD020, 2, PU, 4, "SHL_m8_1");
615 public static final x86 SHL_r8_rc = _op(0xD220, 2, NP, 1, "SHL_r8_rc");
616 public static final x86 SHL_m8_rc = _op(0xD220, 2, NP, 4, "SHL_m8_rc");
617 public static final x86 SHL_r8_i = _op(0xC020, 2, PU, 1, "SHL_r8_i");
618 public static final x86 SHL_m8_i = _op(0xC020, 2, PU, 4, "SHL_m8_i");
619 public static final x86 SHR_r8_1 = _op(0xD028, 2, PU, 1, "SHR_r8_1");
620 public static final x86 SHR_m8_1 = _op(0xD028, 2, PU, 4, "SHR_m8_1");
621 public static final x86 SHR_r8_rc = _op(0xD228, 2, NP, 1, "SHR_r8_rc");
622 public static final x86 SHR_m8_rc = _op(0xD228, 2, NP, 4, "SHR_m8_rc");
623 public static final x86 SHR_r8_i = _op(0xC028, 2, PU, 1, "SHR_r8_i");
624 public static final x86 SHR_m8_i = _op(0xC028, 2, PU, 4, "SHR_m8_i");
625 public static final x86 SAR_r8_1 = _op(0xD038, 2, PU, 1, "SAR_r8_1");
626 public static final x86 SAR_m8_1 = _op(0xD038, 2, PU, 4, "SAR_m8_1");
627 public static final x86 SAR_r8_rc = _op(0xD238, 2, NP, 1, "SAR_r8_rc");
628 public static final x86 SAR_m8_rc = _op(0xD238, 2, NP, 4, "SAR_m8_rc");
629 public static final x86 SAR_r8_i = _op(0xC038, 2, PU, 1, "SAR_r8_i");
630 public static final x86 SAR_m8_i = _op(0xC038, 2, PU, 4, "SAR_m8_i");
631 public static final x86 SHL_r32_1 = _op(0xD120, 2, PU, 1, "SHL_r32_1");
632 public static final x86 SHL_m32_1 = _op(0xD120, 2, PU, 4, "SHL_m32_1");
633 public static final x86 SHL_r32_rc = _op(0xD320, 2, NP, 1, "SHL_r32_rc");
634 public static final x86 SHL_m32_rc = _op(0xD320, 2, NP, 4, "SHL_m32_rc");
635 public static final x86 SHL_r32_i = _op(0xC120, 2, PU, 1, "SHL_r32_i");
636 public static final x86 SHL_m32_i = _op(0xC120, 2, PU, 4, "SHL_m32_i");
637 public static final x86 SHR_r32_1 = _op(0xD128, 2, PU, 1, "SHR_r32_1");
638 public static final x86 SHR_m32_1 = _op(0xD128, 2, PU, 4, "SHR_m32_1");
639 public static final x86 SHR_r32_rc = _op(0xD328, 2, NP, 1, "SHR_r32_rc");
640 public static final x86 SHR_m32_rc = _op(0xD328, 2, NP, 4, "SHR_m32_rc");
641 public static final x86 SHR_r32_i = _op(0xC128, 2, PU, 1, "SHR_r32_i");
642 public static final x86 SHR_m32_i = _op(0xC128, 2, PU, 4, "SHR_m32_i");
643 public static final x86 SAR_r32_1 = _op(0xD138, 2, PU, 1, "SAR_r32_1");
644 public static final x86 SAR_m32_1 = _op(0xD138, 2, PU, 4, "SAR_m32_1");
645 public static final x86 SAR_r32_rc = _op(0xD338, 2, NP, 1, "SAR_r32_rc");
646 public static final x86 SAR_m32_rc = _op(0xD338, 2, NP, 4, "SAR_m32_rc");
647 public static final x86 SAR_r32_i = _op(0xC138, 2, PU, 1, "SAR_r32_i");
648 public static final x86 SAR_m32_i = _op(0xC138, 2, PU, 4, "SAR_m32_i");
649 public static final x86 SBB_ra_i8 = _op(0x1C, 1, PU, 2, "SBB_ra_i8");
650 public static final x86 SBB_ra_i32 = _op(0x1D, 1, PU, 2, "SBB_ra_i32");
651 public static final x86 SBB_r_i8 = _op(0x8018, 2, PU, 2, "SBB_r_i8");
652 public static final x86 SBB_m_i8 = _op(0x8018, 2, PU, 4, "SBB_m_i8");
653 public static final x86 SBB_r_i32 = _op(0x8118, 2, PU, 2, "SBB_r_i32");
654 public static final x86 SBB_m_i32 = _op(0x8118, 2, PU, 4, "SBB_m_i32");
655 public static final x86 SBB_r_m8 = _op(0x1A00, 2, PU, 3, "SBB_r_m8");
656 public static final x86 SBB_m_r8 = _op(0x1800, 2, PU, 4, "SBB_m_r8");
657 public static final x86 SBB_r_r8 = _op(0x1A00, 2, PU, 2, "SBB_r_r8");
658 public static final x86 SBB_r_m32 = _op(0x1B00, 2, PU, 3, "SBB_r_m32");
659 public static final x86 SBB_m_r32 = _op(0x1900, 2, PU, 4, "SBB_m_r32");
660 public static final x86 SBB_r_r32 = _op(0x1B00, 2, PU, 2, "SBB_r_r32");
661 public static final x86 SCAS_m8 = _op(0xAE, 1, -1, -1, "SCAS_m8");
662 public static final x86 SCAS_m32 = _op(0xAF, 1, -1, -1, "SCAS_m32");
663 public static final x86 SETO_r = _op(0x0F90, 2, -1, -1, "SETO_r");
664 public static final x86 SETNO_r = _op(0x0F91, 2, -1, -1, "SETNO_r");
665 public static final x86 SETB_r = _op(0x0F92, 2, -1, -1, "SETB_r");
666 public static final x86 SETAE_r = _op(0x0F93, 2, -1, -1, "SETAE_r");
667 public static final x86 SETE_r = _op(0x0F94, 2, -1, -1, "SETE_r");
668 public static final x86 SETNE_r = _op(0x0F95, 2, -1, -1, "SETNE_r");
669 public static final x86 SETNA_r = _op(0x0F96, 2, -1, -1, "SETNA_r");
670 public static final x86 SETNBE_r = _op(0x0F97, 2, -1, -1, "SETNBE_r");
671 public static final x86 SETS_r = _op(0x0F98, 2, -1, -1, "SETS_r");
672 public static final x86 SETNS_r = _op(0x0F99, 2, -1, -1, "SETNS_r");
673 public static final x86 SETP_r = _op(0x0F9A, 2, -1, -1, "SETP_r");
674 public static final x86 SETNP_r = _op(0x0F9B, 2, -1, -1, "SETNP_r");
675 public static final x86 SETL_r = _op(0x0F9C, 2, -1, -1, "SETL_r");
676 public static final x86 SETGE_r = _op(0x0F9D, 2, -1, -1, "SETGE_r");
677 public static final x86 SETLE_r = _op(0x0F9E, 2, -1, -1, "SETLE_r");
678 public static final x86 SETG_r = _op(0x0F9F, 2, -1, -1, "SETG_r");
679 public static final x86 SETO_m = _op(0x0F90, 2, -1, -1, "SETO_m");
680 public static final x86 SETNO_m = _op(0x0F91, 2, -1, -1, "SETNO_m");
681 public static final x86 SETB_m = _op(0x0F92, 2, -1, -1, "SETB_m");
682 public static final x86 SETAE_m = _op(0x0F93, 2, -1, -1, "SETAE_m");
683 public static final x86 SETE_m = _op(0x0F94, 2, -1, -1, "SETE_m");
684 public static final x86 SETNE_m = _op(0x0F95, 2, -1, -1, "SETNE_m");
685 public static final x86 SETNA_m = _op(0x0F96, 2, -1, -1, "SETNA_m");
686 public static final x86 SETNBE_m = _op(0x0F97, 2, -1, -1, "SETNBE_m");
687 public static final x86 SETS_m = _op(0x0F98, 2, -1, -1, "SETS_m");
688 public static final x86 SETNS_m = _op(0x0F99, 2, -1, -1, "SETNS_m");
689 public static final x86 SETP_m = _op(0x0F9A, 2, -1, -1, "SETP_m");
690 public static final x86 SETNP_m = _op(0x0F9B, 2, -1, -1, "SETNP_m");
691 public static final x86 SETL_m = _op(0x0F9C, 2, -1, -1, "SETL_m");
692 public static final x86 SETGE_m = _op(0x0F9D, 2, -1, -1, "SETGE_m");
693 public static final x86 SETLE_m = _op(0x0F9E, 2, -1, -1, "SETLE_m");
694 public static final x86 SETG_m = _op(0x0F9F, 2, -1, -1, "SETG_m");
695 public static final x86 SGDT = _op(0x0F0100, 3, -1, -1, "SGDT");
696 public static final x86 SIDT = _op(0x0F0108, 3, -1, -1, "SIDT");
697 public static final x86 SHLD_r_r_i = _op(0x0FA400, 3, -1, -1, "SHLD_r_r_i");
698 public static final x86 SHLD_r_r_rc = _op(0x0FA500, 3, -1, -1, "SHLD_r_r_rc");
699 public static final x86 SHLD_m_r_i = _op(0x0FA400, 3, -1, -1, "SHLD_m_r_i");
700 public static final x86 SHLD_m_r_rc = _op(0x0FA500, 3, -1, -1, "SHLD_m_r_rc");
701 public static final x86 SHRD_r_r_i = _op(0x0FAC00, 3, -1, -1, "SHRD_r_r_i");
702 public static final x86 SHRD_r_r_rc = _op(0x0FAD00, 3, -1, -1, "SHRD_r_r_rc");
703 public static final x86 SHRD_m_r_i = _op(0x0FAC00, 3, -1, -1, "SHRD_m_r_i");
704 public static final x86 SHRD_m_r_rc = _op(0x0FAD00, 3, -1, -1, "SHRD_m_r_rc");
705 public static final x86 SLDT = _op(0x0F0000, 3, -1, -1, "SLDT");
706 public static final x86 SMSW = _op(0x0F0120, 3, -1, -1, "SMSW");
707 public static final x86 STC = _op(0xF9, 1, -1, -1, "STC");
708 public static final x86 STD = _op(0xFD, 1, -1, -1, "STD");
709 public static final x86 STI = _op(0xFB, 1, -1, -1, "STI");
710 public static final x86 STOS_m8 = _op(0xAA, 1, -1, -1, "STOS_m8");
711 public static final x86 STOS_m32 = _op(0xAB, 1, -1, -1, "STOS_m32");
712 public static final x86 STR_r = _op(0x0F0080, 3, -1, -1, "STR_r");
713 public static final x86 STR_m = _op(0x0F0080, 3, -1, -1, "STR_m");
714 public static final x86 SUB_ra_i8 = _op(0x2C, 1, UV, 1, "SUB_ra_i8");
715 public static final x86 SUB_r_i8 = _op(0x8028, 2, UV, 1, "SUB_r_i8");
716 public static final x86 SUB_m_i8 = _op(0x8028, 2, UV, 4, "SUB_m_i8");
717 public static final x86 SUB_r_m8 = _op(0x2A00, 2, UV, 2, "SUB_r_m8");
718 public static final x86 SUB_m_r8 = _op(0x2800, 2, UV, 4, "SUB_m_r8");
719 public static final x86 SUB_r_r8 = _op(0x2A00, 2, UV, 1, "SUB_r_r8");
720 public static final x86 SUB_ra_i32 = _op(0x2D, 1, UV, 1, "SUB_ra_i32");
721 public static final x86 SUB_r_i32 = _op(0x8128, 2, UV, 1, "SUB_r_i32");
722 public static final x86 SUB_m_i32 = _op(0x8128, 2, UV, 4, "SUB_m_i32");
723 public static final x86 SUB_r_m32 = _op(0x2B00, 2, UV, 2, "SUB_r_m32");
724 public static final x86 SUB_m_r32 = _op(0x2900, 2, UV, 4, "SUB_m_r32");
725 public static final x86 SUB_r_r32 = _op(0x2B00, 2, UV, 1, "SUB_r_r32");
726 public static final x86 TEST_ra_i8 = _op(0xA8, 1, -1, -1, "TEST_ra_i8");
727 public static final x86 TEST_ra_i32 = _op(0xA9, 1, -1, -1, "TEST_ra_i32");
728 public static final x86 TEST_r_i8 = _op(0xF600, 2, -1, -1, "TEST_r_i8");
729 public static final x86 TEST_r_i32 = _op(0xF700, 2, -1, -1, "TEST_r_i32");
730 public static final x86 TEST_m_i8 = _op(0xF600, 2, -1, -1, "TEST_m_i8");
731 public static final x86 TEST_m_i32 = _op(0xF700, 2, -1, -1, "TEST_m_i32");
732 public static final x86 TEST_r_r8 = _op(0x8400, 2, -1, -1, "TEST_r_r8");
733 public static final x86 TEST_r_r32 = _op(0x8500, 2, -1, -1, "TEST_r_r32");
734 public static final x86 TEST_m_r8 = _op(0x8400, 2, -1, -1, "TEST_m_r8");
735 public static final x86 TEST_m_r32 = _op(0x8500, 2, -1, -1, "TEST_m_r32");
736 public static final x86 UD2 = _op(0x0F0B, 2, -1, -1, "UD2");
737 public static final x86 VERR_r = _op(0x0F0020, 3, -1, -1, "VERR_r");
738 public static final x86 VERR_m = _op(0x0F0020, 3, -1, -1, "VERR_m");
739 public static final x86 VERW_r = _op(0x0F0028, 3, -1, -1, "VERW_r");
740 public static final x86 VERW_m = _op(0x0F0028, 3, -1, -1, "VERW_m");
741 public static final x86 WAIT = _op(0x9B, 1, -1, -1, "WAIT");
742 public static final x86 WBINVD = _op(0x0F09, 2, -1, -1, "WBINVD");
743 public static final x86 WRMSR = _op(0x0F30, 2, -1, -1, "WRMSR");
744 public static final x86 XADD_r_r8 = _op(0x0FC000, 3, -1, -1, "XADD_r_r8");
745 public static final x86 XADD_r_r32 = _op(0x0FC100, 3, -1, -1, "XADD_r_r32");
746 public static final x86 XADD_m_r8 = _op(0x0FC000, 3, -1, -1, "XADD_m_r8");
747 public static final x86 XADD_m_r32 = _op(0x0FC100, 3, -1, -1, "XADD_m_r32");
748 public static final x86 XCHG_ra_r = _op(0x90, 1, -1, -1, "XCHG_ra_r");
749 public static final x86 XCHG_r_r8 = _op(0x8600, 2, -1, -1, "XCHG_r_r8");
750 public static final x86 XCHG_m_r8 = _op(0x8600, 2, -1, -1, "XCHG_m_r8");
751 public static final x86 XCHG_r_r32 = _op(0x8700, 2, -1, -1, "XCHG_r_r32");
752 public static final x86 XCHG_m_r32 = _op(0x8700, 2, -1, -1, "XCHG_m_r32");
753 public static final x86 XLAT = _op(0xD7, 1, -1, -1, "XLAT");
754 public static final x86 XOR_ra_i8 = _op(0x34, 1, UV, 1, "XOR_ra_i8");
755 public static final x86 XOR_r_i8 = _op(0x8030, 2, UV, 1, "XOR_r_i8");
756 public static final x86 XOR_m_i8 = _op(0x8030, 2, UV, 4, "XOR_m_i8");
757 public static final x86 XOR_r_m8 = _op(0x3200, 2, UV, 2, "XOR_r_m8");
758 public static final x86 XOR_m_r8 = _op(0x3000, 2, UV, 4, "XOR_m_r8");
759 public static final x86 XOR_r_r8 = _op(0x3200, 2, UV, 1, "XOR_r_r8");
760 public static final x86 XOR_ra_i32 = _op(0x3500, 2, UV, 1, "XOR_ra_i32");
761 public static final x86 XOR_r_i32 = _op(0x8130, 2, UV, 1, "XOR_r_i32");
762 public static final x86 XOR_m_i32 = _op(0x8130, 2, UV, 4, "XOR_m_i32");
763 public static final x86 XOR_r_m32 = _op(0x3300, 2, UV, 2, "XOR_r_m32");
764 public static final x86 XOR_m_r32 = _op(0x3100, 2, UV, 4, "XOR_m_r32");
765 public static final x86 XOR_r_r32 = _op(0x3300, 2, UV, 1, "XOR_r_r32");
766
767 public static final byte PREFIX_LOCK = (byte)0xf0;
768 public static final byte PREFIX_REPNE = (byte)0xf2;
769 public static final byte PREFIX_REP = (byte)0xf3;
770 public static final byte PREFIX_REPE = (byte)0xf3;
771 public static final byte PREFIX_16BIT = 0x66;
772 public static final byte PREFIX_CS = 0x2e;
773 public static final byte PREFIX_SS = 0x36;
774 public static final byte PREFIX_DS = 0x3e;
775 public static final byte PREFIX_ES = 0x26;
776 public static final byte PREFIX_FS = 0x64;
777 public static final byte PREFIX_GS = 0x65;
778 public static final byte PREFIX_16BIT_ADDR = 0x67;
779 public static final byte BRHINT_NOT_TAKEN = 0x2e;
780 public static final byte BRHINT_TAKEN = 0x3e;
781
782 public static final int s_Short_Reg() { return 1; }
783 final int emitShort_Reg(CodeAllocator.x86CodeBuffer mc, int reg) {
784 Assert._assert(length == 1);
785 Assert._assert((opcode & 0x07) == 0);
786 Assert._assert(reg >= EAX && reg <= EDI);
787 if (mc != null)
788 mc.add1((byte)(opcode+reg));
789 if (x86Assembler.TRACE) dbg(mc, 1, desc, RegToString(reg));
790 return 1;
791 }
792 public static final int s_Short_Reg_Imm8() { return 2; }
793 final int emitShort_Reg_Imm8(CodeAllocator.x86CodeBuffer mc, int reg, int imm) {
794 Assert._assert(length == 1);
795 Assert._assert((opcode & 0x07) == 0);
796 Assert._assert(reg >= EAX && reg <= EDI);
797 if (mc != null) {
798 mc.add1((byte)(opcode+reg));
799 mc.add1((byte)imm);
800 }
801 if (x86Assembler.TRACE) dbg(mc, 2, desc, RegToString(reg), Imm8ToString(imm));
802 return 2;
803 }
804 public static final int s_Short_Reg_Imm32() { return 5; }
805 final int emitShort_Reg_Imm32(CodeAllocator.x86CodeBuffer mc, int reg, int imm) {
806 Assert._assert(length == 1);
807 Assert._assert((opcode & 0x07) == 0);
808 Assert._assert(reg >= EAX && reg <= EDI);
809 if (mc != null) {
810 mc.add1((byte)(opcode+reg));
811 mc.add4_endian(imm);
812 }
813 if (x86Assembler.TRACE) dbg(mc, 5, desc, RegToString(reg), Imm32ToString(imm));
814 return 5;
815 }
816 public static final int s_1() { return 1; }
817 final int emit1(CodeAllocator.x86CodeBuffer mc) {
818 Assert._assert(length == 1);
819 if (mc != null) {
820 mc.add1((byte)opcode);
821 }
822 if (x86Assembler.TRACE) dbg(mc, 1, desc);
823 return 1;
824 }
825 public static final int s_CJump_Short() { return 2; }
826 final int emitCJump_Short(CodeAllocator.x86CodeBuffer mc, byte offset) {
827 Assert._assert(length == 1);
828 if (mc != null) {
829 mc.add1((byte)(opcode | CJUMP_SHORT));
830 mc.add1((byte)(offset & 0xFF));
831 }
832 if (x86Assembler.TRACE) dbg(mc, 2, desc, Strings.hex(mc.getCurrentOffset()+offset)+" (offset "+Strings.shex(offset)+")");
833 return 2;
834 }
835 public static final int s_Jump_Short() { return 2; }
836 final int emitJump_Short(CodeAllocator.x86CodeBuffer mc, byte offset) {
837 Assert._assert(length == 1);
838 if (mc != null) {
839 mc.add1((byte)(opcode | JUMP_SHORT));
840 mc.add1((byte)(offset & 0xFF));
841 }
842 if (x86Assembler.TRACE) dbg(mc, 2, desc, Strings.hex(mc.getCurrentOffset()+offset)+" (offset "+Strings.shex(offset)+")");
843 return 2;
844 }
845 public static final int s_1_Imm8() { return 2; }
846 final int emit1_Imm8(CodeAllocator.x86CodeBuffer mc, int imm) {
847 Assert._assert(length == 1);
848 if (mc != null) {
849 mc.add1((byte)opcode);
850 mc.add1((byte)(imm & 0xFF));
851 }
852 if (x86Assembler.TRACE) dbg(mc, 2, desc, Imm8ToString(imm));
853 return 2;
854 }
855 public static final int s_1_Imm16() { return 3; }
856 final int emit1_Imm16(CodeAllocator.x86CodeBuffer mc, char imm) {
857 Assert._assert(length == 1);
858 if (mc != null) {
859 mc.add1((byte)opcode);
860 mc.add2_endian(imm);
861 }
862 if (x86Assembler.TRACE) dbg(mc, 3, desc, Imm16ToString(imm));
863 return 3;
864 }
865 public static final int s_1_Imm32() { return 5; }
866 final int emit1_Imm32(CodeAllocator.x86CodeBuffer mc, int imm) {
867 Assert._assert(length == 1);
868 if (mc != null) {
869 mc.add1((byte)opcode);
870 mc.add4_endian(imm);
871 }
872 if (x86Assembler.TRACE) dbg(mc, 5, desc, Imm32ToString(imm));
873 return 5;
874 }
875 public static final int s_Jump_Near() { return 5; }
876 final int emitJump_Near(CodeAllocator.x86CodeBuffer mc, int offset) {
877 Assert._assert(length == 1);
878 if (mc != null) {
879 mc.add1((byte)(opcode | JUMP_NEAR));
880 mc.add4_endian(offset);
881 }
882 if (x86Assembler.TRACE) dbg(mc, 5, desc, (mc.getCurrentOffset()+offset)+" (offset "+offset+")");
883 return 5;
884 }
885 public static final int s_Call_Near() { return 5; }
886 final int emitCall_Near(CodeAllocator.x86CodeBuffer mc, int offset) {
887 Assert._assert(length == 1);
888 if (mc != null) {
889 mc.add1((byte)(opcode));
890 mc.add4_endian(offset);
891 }
892 if (x86Assembler.TRACE) dbg(mc, 5, desc, (mc.getCurrentOffset()+offset)+" (offset "+offset+")");
893 return 5;
894 }
895 public static final int s_RA_1_Imm32() { return 5; }
896 final int emit1_RA_Imm32(CodeAllocator.x86CodeBuffer mc, int imm) {
897 Assert._assert(length == 1);
898 if (mc != null) {
899 mc.add1((byte)(opcode | RA));
900 mc.add4_endian(imm);
901 }
902 if (x86Assembler.TRACE) dbg(mc, 5, desc, "EAX", Imm32ToString(imm));
903 return 5;
904 }
905 public static final int s_2() { return 2; }
906 final int emit2(CodeAllocator.x86CodeBuffer mc) {
907 Assert._assert(length == 2);
908 if (mc != null) {
909 mc.add2(opcode);
910 }
911 if (x86Assembler.TRACE) dbg(mc, 2, desc);
912 return 2;
913 }
914 public static final int s_2_FPReg() { return 2; }
915 final int emit2_FPReg(CodeAllocator.x86CodeBuffer mc, int r) {
916 Assert._assert(length == 2);
917 Assert._assert((opcode & 0x7) == 0);
918 Assert._assert(r >= 0 && r <= 7);
919 if (mc != null) {
920 mc.add2(opcode + r);
921 }
922 if (x86Assembler.TRACE) dbg(mc, 2, desc, FPRegToString(r));
923 return 2;
924 }
925 public static final int s_2_Imm32() { return 6; }
926 final int emit2_Imm32(CodeAllocator.x86CodeBuffer mc, int imm) {
927 Assert._assert(length == 2);
928 if (mc != null) {
929 mc.add2(opcode);
930 mc.add4_endian(imm);
931 }
932 if (x86Assembler.TRACE) dbg(mc, 6, desc, Imm32ToString(imm));
933 return 6;
934 }
935 public static final int s_CJump_Near() { return 6; }
936 final int emitCJump_Near(CodeAllocator.x86CodeBuffer mc, int offset) {
937 Assert._assert(length == 1);
938 if (mc != null) {
939 mc.add2(opcode | CJUMP_NEAR);
940 mc.add4_endian(offset);
941 }
942 if (x86Assembler.TRACE) dbg(mc, 6, desc, (mc.getCurrentOffset()+offset)+" (offset "+offset+")");
943 return 6;
944 }
945 public static final int s_2_Reg() { return 2; }
946 final int emit2_Reg(CodeAllocator.x86CodeBuffer mc, int reg) {
947 Assert._assert(length == 2);
948 Assert._assert((opcode & 0xC7) == 0);
949 Assert._assert(reg >= EAX && reg <= EDI);
950 if (mc != null) {
951 mc.add2(opcode | MOD_REG | reg);
952 }
953 if (x86Assembler.TRACE) dbg(mc, 2, desc, RegToString(reg));
954 return 2;
955 }
956 public static final int s_2_Once_Reg() { return 2; }
957 final int emit2_Once_Reg(CodeAllocator.x86CodeBuffer mc, int reg) {
958 Assert._assert(length == 2);
959 Assert._assert((opcode & 0xC7) == 0);
960 Assert._assert(reg >= EAX && reg <= EDI);
961 if (mc != null) {
962 mc.add2(opcode | SHIFT_ONCE | MOD_REG | reg);
963 }
964 if (x86Assembler.TRACE) dbg(mc, 2, desc, RegToString(reg), "1");
965 return 2;
966 }
967 public static final int s_2_Reg_SEImm8() { return 3; }
968 final int emit2_Reg_SEImm8(CodeAllocator.x86CodeBuffer mc, int reg, byte imm) {
969 Assert._assert(length == 2);
970 Assert._assert((opcode & 0xC7) == 0);
971 Assert._assert(reg >= EAX && reg <= EDI);
972 if (mc != null) {
973 mc.add2(opcode | SEIMM8 | MOD_REG | reg);
974 mc.add1(imm);
975 }
976 if (x86Assembler.TRACE) dbg(mc, 3, desc, RegToString(reg), SEImm8ToString(imm));
977 return 3;
978 }
979 public static final int s_2_Reg_Imm8() { return 3; }
980 final int emit2_Reg_Imm8(CodeAllocator.x86CodeBuffer mc, int reg, int imm) {
981 Assert._assert(length == 2);
982 Assert._assert((opcode & 0xC7) == 0);
983 Assert._assert(reg >= EAX && reg <= EDI);
984 if (mc != null) {
985 mc.add2(opcode | MOD_REG | reg);
986 mc.add1((byte)imm);
987 }
988 if (x86Assembler.TRACE) dbg(mc, 3, desc, RegToString(reg), Imm8ToString(imm));
989 return 3;
990 }
991 public static final int s_2_Reg_Imm32() { return 6; }
992 final int emit2_Reg_Imm32(CodeAllocator.x86CodeBuffer mc, int reg, int imm) {
993 Assert._assert(length == 2);
994 Assert._assert((opcode & 0xC7) == 0);
995 Assert._assert(reg >= EAX && reg <= EDI);
996 if (mc != null) {
997 mc.add2(opcode | MOD_REG | reg);
998 mc.add4_endian(imm);
999 }
1000 if (x86Assembler.TRACE) dbg(mc, 6, desc, RegToString(reg), Imm32ToString(imm));
1001 return 6;
1002 }
1003 public static final int s_2_Reg_Reg() { return 2; }
1004 final int emit2_Reg_Reg(CodeAllocator.x86CodeBuffer mc, int toreg, int fromreg) {
1005 Assert._assert(length == 2);
1006 Assert._assert((opcode & 0xFF) == 0);
1007 Assert._assert(toreg >= EAX && toreg <= EDI);
1008 Assert._assert(fromreg >= EAX && fromreg <= EDI);
1009 if (mc != null) {
1010 mc.add2(opcode | MOD_REG | (toreg << 3) | fromreg);
1011 }
1012 if (x86Assembler.TRACE) dbg(mc, 2, desc, RegToString(toreg), RegToString(fromreg));
1013 return 2;
1014 }
1015 public static final int s_2_Reg_EA() { return 2; }
1016 final int emit2_Reg_EA(CodeAllocator.x86CodeBuffer mc, int r1, int base) {
1017 Assert._assert(length == 2);
1018 Assert._assert(base != ESP);
1019 Assert._assert(base != EBP);
1020 Assert._assert((opcode & 0xFF) == 0);
1021 Assert._assert(r1 >= EAX && r1 <= EDI);
1022 Assert._assert(base >= EAX && base <= EDI);
1023 if (mc != null) {
1024 mc.add2(opcode | MOD_EA | (r1 << 3) | base);
1025 }
1026 if (x86Assembler.TRACE) dbg(mc, 2, desc, RegToString(r1), EAToString(base));
1027 return 2;
1028 }
1029 public static final int s_2_Reg_DISP8() { return 3; }
1030 final int emit2_Reg_DISP8(CodeAllocator.x86CodeBuffer mc, int r1, byte off, int base) {
1031 Assert._assert(length == 2);
1032 Assert._assert(base != ESP);
1033 Assert._assert((opcode & 0xFF) == 0);
1034 Assert._assert(r1 >= EAX && r1 <= EDI);
1035 Assert._assert(base >= EAX && base <= EDI);
1036 if (mc != null) {
1037 mc.add2(opcode | MOD_DISP8 | (r1 << 3) | base);
1038 mc.add1(off);
1039 }
1040 if (x86Assembler.TRACE) dbg(mc, 3, desc, RegToString(r1), DISP8ToString(off, base));
1041 return 3;
1042 }
1043 public static final int s_2_Reg_DISP8_SEImm8() { return 4; }
1044 final int emit2_Reg_DISP8_SEImm8(CodeAllocator.x86CodeBuffer mc, int r1, byte off, int base, byte imm) {
1045 Assert._assert(length == 2);
1046 Assert._assert(base != ESP);
1047 Assert._assert((opcode & 0xFF) == 0);
1048 Assert._assert(r1 >= EAX && r1 <= EDI);
1049 Assert._assert(base >= EAX && base <= EDI);
1050 if (mc != null) {
1051 mc.add2(opcode | SEIMM8 | MOD_DISP8 | (r1 << 3) | base);
1052 mc.add1(off);
1053 mc.add1(imm);
1054 }
1055 if (x86Assembler.TRACE) dbg(mc, 4, desc, RegToString(r1), DISP8ToString(off, base), SEImm8ToString(imm));
1056 return 4;
1057 }
1058 public static final int s_2_Reg_DISP8_Imm8() { return 4; }
1059 final int emit2_Reg_DISP8_Imm8(CodeAllocator.x86CodeBuffer mc, int r1, byte off, int base, int imm) {
1060 Assert._assert(length == 2);
1061 Assert._assert(base != ESP);
1062 Assert._assert((opcode & 0xFF) == 0);
1063 Assert._assert(r1 >= EAX && r1 <= EDI);
1064 Assert._assert(base >= EAX && base <= EDI);
1065 if (mc != null) {
1066 mc.add2(opcode | MOD_DISP8 | (r1 << 3) | base);
1067 mc.add1(off);
1068 mc.add1((byte)imm);
1069 }
1070 if (x86Assembler.TRACE) dbg(mc, 4, desc, RegToString(r1), DISP8ToString(off, base), Imm8ToString(imm));
1071 return 4;
1072 }
1073 public static final int s_2_Reg_DISP8_Imm32() { return 7; }
1074 final int emit2_Reg_DISP8_Imm32(CodeAllocator.x86CodeBuffer mc, int r1, byte off, int base, int imm) {
1075 Assert._assert(length == 2);
1076 Assert._assert(base != ESP);
1077 Assert._assert((opcode & 0xFF) == 0);
1078 Assert._assert(r1 >= EAX && r1 <= EDI);
1079 Assert._assert(base >= EAX && base <= EDI);
1080 if (mc != null) {
1081 mc.add2(opcode | MOD_DISP8 | (r1 << 3) | base);
1082 mc.add1(off);
1083 mc.add4_endian(imm);
1084 }
1085 if (x86Assembler.TRACE) dbg(mc, 7, desc, RegToString(r1), DISP8ToString(off, base), Imm32ToString(imm));
1086 return 7;
1087 }
1088 public static final int s_2_Reg_SIB_EA() { return 3; }
1089 final int emit2_Reg_SIB_EA(CodeAllocator.x86CodeBuffer mc, int r1, int base, int ind, int scale) {
1090 Assert._assert(length == 2);
1091 Assert._assert((opcode & 0xFF) == 0);
1092 Assert._assert(r1 >= EAX && r1 <= EDI);
1093 Assert._assert(base >= EAX && base <= EDI);
1094 if (mc != null) {
1095 mc.add2(opcode | MOD_EA | (r1 << 3) | RM_SIB);
1096 mc.add1((byte)(scale | (ind << 3) | base));
1097 }
1098 if (x86Assembler.TRACE) dbg(mc, 3, desc, RegToString(r1), EA_SIBToString(base, ind, scale));
1099 return 3;
1100 }
1101 public static final int s_2_Reg_SIB_DISP8() { return 4; }
1102 final int emit2_Reg_SIB_DISP8(CodeAllocator.x86CodeBuffer mc, int r1, int base, int ind, int scale, byte off) {
1103 Assert._assert(length == 2);
1104 Assert._assert((opcode & 0xFF) == 0);
1105 Assert._assert(r1 >= EAX && r1 <= EDI);
1106 Assert._assert(base >= EAX && base <= EDI);
1107 Assert._assert(ind >= EAX && ind <= EDI);
1108 if (mc != null) {
1109 mc.add2(opcode | MOD_DISP8 | (r1 << 3) | RM_SIB);
1110 mc.add1((byte)(scale | (ind << 3) | base));
1111 mc.add1(off);
1112 }
1113 if (x86Assembler.TRACE) dbg(mc, 4, desc, RegToString(r1), DISP8_SIBToString(base, ind, scale, off));
1114 return 4;
1115 }
1116 public static final int s_2_Reg_DISP32() { return 6; }
1117 final int emit2_Reg_DISP32(CodeAllocator.x86CodeBuffer mc, int r1, int off, int base) {
1118 Assert._assert(length == 2);
1119 Assert._assert(base != ESP);
1120 Assert._assert((opcode & 0xFF) == 0);
1121 Assert._assert(r1 >= EAX && r1 <= EDI);
1122 Assert._assert(base >= EAX && base <= EDI);
1123 if (mc != null) {
1124 mc.add2(opcode | MOD_DISP32 | (r1 << 3) | base);
1125 mc.add4_endian(off);
1126 }
1127 if (x86Assembler.TRACE) dbg(mc, 6, desc, RegToString(r1), DISP32ToString(off, base));
1128 return 6;
1129 }
1130 public static final int s_2_Reg_DISP32_SEImm8() { return 7; }
1131 final int emit2_Reg_DISP32_SEImm8(CodeAllocator.x86CodeBuffer mc, int r1, int off, int base, byte imm) {
1132 Assert._assert(length == 2);
1133 Assert._assert(base != ESP);
1134 Assert._assert((opcode & 0xFF) == 0);
1135 Assert._assert(r1 >= EAX && r1 <= EDI);
1136 Assert._assert(base >= EAX && base <= EDI);
1137 if (mc != null) {
1138 mc.add2(opcode | SEIMM8 | MOD_DISP32 | (r1 << 3) | base);
1139 mc.add4_endian(off);
1140 mc.add1(imm);
1141 }
1142 if (x86Assembler.TRACE) dbg(mc, 7, desc, RegToString(r1), DISP32ToString(off, base), SEImm8ToString(imm));
1143 return 7;
1144 }
1145 public static final int s_2_Reg_DISP32_Imm8() { return 7; }
1146 final int emit2_Reg_DISP32_Imm8(CodeAllocator.x86CodeBuffer mc, int r1, int off, int base, int imm) {
1147 Assert._assert(length == 2);
1148 Assert._assert(base != ESP);
1149 Assert._assert((opcode & 0xFF) == 0);
1150 Assert._assert(r1 >= EAX && r1 <= EDI);
1151 Assert._assert(base >= EAX && base <= EDI);
1152 if (mc != null) {
1153 mc.add2(opcode | MOD_DISP32 | (r1 << 3) | base);
1154 mc.add4_endian(off);
1155 mc.add1((byte)imm);
1156 }
1157 if (x86Assembler.TRACE) dbg(mc, 7, desc, RegToString(r1), DISP32ToString(off, base), Imm8ToString(imm));
1158 return 7;
1159 }
1160 public static final int s_2_Reg_DISP32_Imm32() { return 10; }
1161 final int emit2_Reg_DISP32_Imm32(CodeAllocator.x86CodeBuffer mc, int r1, int off, int base, int imm) {
1162 Assert._assert(length == 2);
1163 Assert._assert(base != ESP);
1164 Assert._assert((opcode & 0xFF) == 0);
1165 Assert._assert(r1 >= EAX && r1 <= EDI);
1166 Assert._assert(base >= EAX && base <= EDI);
1167 if (mc != null) {
1168 mc.add2(opcode | MOD_DISP32 | (r1 << 3) | base);
1169 mc.add4_endian(off);
1170 mc.add4_endian(imm);
1171 }
1172 if (x86Assembler.TRACE) dbg(mc, 10, desc, RegToString(r1), DISP32ToString(off, base), Imm32ToString(imm));
1173 return 10;
1174 }
1175 public static final int s_2_Reg_SIB_DISP32() { return 7; }
1176 final int emit2_Reg_SIB_DISP32(CodeAllocator.x86CodeBuffer mc, int r1, int base, int ind, int scale, int off) {
1177 Assert._assert(length == 2);
1178 Assert._assert((opcode & 0xFF) == 0);
1179 Assert._assert(r1 >= EAX && r1 <= EDI);
1180 Assert._assert(base >= EAX && base <= EDI);
1181 Assert._assert(ind >= EAX && ind <= EDI);
1182 if (mc != null) {
1183 mc.add2(opcode | MOD_DISP32 | (r1 << 3) | RM_SIB);
1184 mc.add1((byte)(scale | (ind << 3) | base));
1185 mc.add4_endian(off);
1186 }
1187 if (x86Assembler.TRACE) dbg(mc, 7, desc, RegToString(r1), DISP32_SIBToString(base, ind, scale, off));
1188 return 7;
1189 }
1190 public static final int s_2_Reg_Abs32() { return 6; }
1191 final int emit2_Reg_Abs32(CodeAllocator.x86CodeBuffer mc, int r1, int addr) {
1192 Assert._assert(length == 2);
1193 Assert._assert((opcode & 0xC7) == 0);
1194 Assert._assert(r1 >= EAX && r1 <= EDI);
1195 if (mc != null) {
1196 mc.add2(opcode | MOD_EA | (r1 << 3) | EBP);
1197 mc.add4_endian(addr);
1198 }
1199 if (x86Assembler.TRACE) dbg(mc, 6, desc, RegToString(r1), Abs32ToString(addr));
1200 return 6;
1201 }
1202 public static final int s_2_EA() { return 2; }
1203 final int emit2_EA(CodeAllocator.x86CodeBuffer mc, int base) {
1204 Assert._assert(length == 2);
1205 Assert._assert(base != ESP);
1206 Assert._assert(base != EBP);
1207 Assert._assert((opcode & 0xC7) == 0);
1208 Assert._assert(base >= EAX && base <= EDI);
1209 if (mc != null) {
1210 mc.add2(opcode | MOD_EA | base);
1211 }
1212 if (x86Assembler.TRACE) dbg(mc, 2, desc, EAToString(base));
1213 return 2;
1214 }
1215 public static final int s_2_Once_EA() { return 2; }
1216 final int emit2_Once_EA(CodeAllocator.x86CodeBuffer mc, int base) {
1217 Assert._assert(length == 2);
1218 Assert._assert(base != ESP);
1219 Assert._assert(base != EBP);
1220 Assert._assert((opcode & 0xC7) == 0);
1221 Assert._assert(base >= EAX && base <= EDI);
1222 if (mc != null) {
1223 mc.add2(opcode | SHIFT_ONCE | MOD_EA | base);
1224 }
1225 if (x86Assembler.TRACE) dbg(mc, 2, desc, EAToString(base), "1");
1226 return 2;
1227 }
1228 public static final int s_2_EA_SEImm8() { return 3; }
1229 final int emit2_EA_SEImm8(CodeAllocator.x86CodeBuffer mc, int base, byte imm) {
1230 Assert._assert(length == 2);
1231 Assert._assert(base != ESP);
1232 Assert._assert(base != EBP);
1233 Assert._assert((opcode & 0xC7) == 0);
1234 Assert._assert(base >= EAX && base <= EDI);
1235 if (mc != null) {
1236 mc.add2(opcode | SEIMM8 | MOD_EA | base);
1237 mc.add1(imm);
1238 }
1239 if (x86Assembler.TRACE) dbg(mc, 3, desc, EAToString(base), SEImm8ToString(imm));
1240 return 3;
1241 }
1242 public static final int s_2_EA_Imm8() { return 3; }
1243 final int emit2_EA_Imm8(CodeAllocator.x86CodeBuffer mc, int base, int imm) {
1244 Assert._assert(length == 2);
1245 Assert._assert(base != ESP);
1246 Assert._assert(base != EBP);
1247 Assert._assert((opcode & 0xC7) == 0);
1248 Assert._assert(base >= EAX && base <= EDI);
1249 if (mc != null) {
1250 mc.add2(opcode | MOD_EA | base);
1251 mc.add1((byte)imm);
1252 }
1253 if (x86Assembler.TRACE) dbg(mc, 3, desc, EAToString(base), Imm8ToString(imm));
1254 return 3;
1255 }
1256 public static final int s_2_EA_Imm32() { return 6; }
1257 final int emit2_EA_Imm32(CodeAllocator.x86CodeBuffer mc, int base, int imm) {
1258 Assert._assert(length == 2);
1259 Assert._assert(base != ESP);
1260 Assert._assert(base != EBP);
1261 Assert._assert((opcode & 0xC7) == 0);
1262 Assert._assert(base >= EAX && base <= EDI);
1263 if (mc != null) {
1264 mc.add2(opcode | MOD_EA | base);
1265 mc.add4_endian(imm);
1266 }
1267 if (x86Assembler.TRACE) dbg(mc, 6, desc, EAToString(base), Imm32ToString(imm));
1268 return 6;
1269 }
1270 public static final int s_2_SIB_EA() { return 3; }
1271 final int emit2_SIB_EA(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale) {
1272 Assert._assert(length == 2);
1273 Assert._assert((opcode & 0xC7) == 0);
1274 Assert._assert(base >= EAX && base <= EDI);
1275 Assert._assert(ind >= EAX && ind <= EDI);
1276 if (mc != null) {
1277 mc.add2(opcode | MOD_EA | RM_SIB);
1278 mc.add1((byte)(scale | (ind << 3) | base));
1279 }
1280 if (x86Assembler.TRACE) dbg(mc, 3, desc, EA_SIBToString(base, ind, scale));
1281 return 3;
1282 }
1283 public static final int s_2_Once_SIB_EA() { return 3; }
1284 final int emit2_Once_SIB_EA(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale) {
1285 Assert._assert(length == 2);
1286 Assert._assert((opcode & 0xC7) == 0);
1287 Assert._assert(base >= EAX && base <= EDI);
1288 Assert._assert(ind >= EAX && ind <= EDI);
1289 if (mc != null) {
1290 mc.add2(opcode | SHIFT_ONCE | MOD_EA | RM_SIB);
1291 mc.add1((byte)(scale | (ind << 3) | base));
1292 }
1293 if (x86Assembler.TRACE) dbg(mc, 3, desc, EA_SIBToString(base, ind, scale), "1");
1294 return 3;
1295 }
1296 public static final int s_2_SIB_EA_SEImm8() { return 4; }
1297 final int emit2_SIB_EA_SEImm8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, byte imm) {
1298 Assert._assert(length == 2);
1299 Assert._assert((opcode & 0xC7) == 0);
1300 Assert._assert(base >= EAX && base <= EDI);
1301 Assert._assert(ind >= EAX && ind <= EDI);
1302 if (mc != null) {
1303 mc.add2(opcode | SEIMM8 | MOD_EA | RM_SIB);
1304 mc.add1((byte)(scale | (ind << 3) | base));
1305 mc.add1(imm);
1306 }
1307 if (x86Assembler.TRACE) dbg(mc, 4, desc, EA_SIBToString(base, ind, scale), SEImm8ToString(imm));
1308 return 4;
1309 }
1310 public static final int s_2_SIB_EA_Imm8() { return 4; }
1311 final int emit2_SIB_EA_Imm8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, int imm) {
1312 Assert._assert(length == 2);
1313 Assert._assert((opcode & 0xC7) == 0);
1314 Assert._assert(base >= EAX && base <= EDI);
1315 Assert._assert(ind >= EAX && ind <= EDI);
1316 if (mc != null) {
1317 mc.add2(opcode | MOD_EA | RM_SIB);
1318 mc.add1((byte)(scale | (ind << 3) | base));
1319 mc.add1((byte)imm);
1320 }
1321 if (x86Assembler.TRACE) dbg(mc, 4, desc, EA_SIBToString(base, ind, scale), Imm8ToString(imm));
1322 return 4;
1323 }
1324 public static final int s_2_SIB_EA_Imm32() { return 7; }
1325 final int emit2_SIB_EA_Imm32(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, int imm) {
1326 Assert._assert(length == 2);
1327 Assert._assert((opcode & 0xC7) == 0);
1328 Assert._assert(base >= EAX && base <= EDI);
1329 Assert._assert(ind >= EAX && ind <= EDI);
1330 if (mc != null) {
1331 mc.add2(opcode | MOD_EA | RM_SIB);
1332 mc.add1((byte)(scale | (ind << 3) | base));
1333 mc.add4_endian(imm);
1334 }
1335 if (x86Assembler.TRACE) dbg(mc, 7, desc, EA_SIBToString(base, ind, scale), Imm32ToString(imm));
1336 return 7;
1337 }
1338 public static final int s_2_DISP8() { return 3; }
1339 final int emit2_DISP8(CodeAllocator.x86CodeBuffer mc, byte off, int base) {
1340 Assert._assert(length == 2);
1341 Assert._assert(base != ESP);
1342 Assert._assert((opcode & 0xC7) == 0);
1343 Assert._assert(base >= EAX && base <= EDI);
1344 if (mc != null) {
1345 mc.add2(opcode | MOD_DISP8 | base);
1346 mc.add1(off);
1347 }
1348 if (x86Assembler.TRACE) dbg(mc, 3, desc, DISP8ToString(off, base));
1349 return 3;
1350 }
1351 public static final int s_2_Once_DISP8() { return 3; }
1352 final int emit2_Once_DISP8(CodeAllocator.x86CodeBuffer mc, byte off, int base) {
1353 Assert._assert(length == 2);
1354 Assert._assert(base != ESP);
1355 Assert._assert((opcode & 0xC7) == 0);
1356 Assert._assert(base >= EAX && base <= EDI);
1357 if (mc != null) {
1358 mc.add2(opcode | SHIFT_ONCE | MOD_DISP8 | base);
1359 mc.add1(off);
1360 }
1361 if (x86Assembler.TRACE) dbg(mc, 3, desc, DISP8ToString(off, base), "1");
1362 return 3;
1363 }
1364 public static final int s_2_DISP8_SEImm8() { return 4; }
1365 final int emit2_DISP8_SEImm8(CodeAllocator.x86CodeBuffer mc, byte off, int base, byte imm) {
1366 Assert._assert(length == 2);
1367 Assert._assert(base != ESP);
1368 Assert._assert((opcode & 0xC7) == 0);
1369 Assert._assert(base >= EAX && base <= EDI);
1370 if (mc != null) {
1371 mc.add2(opcode | SEIMM8 | MOD_DISP8 | base);
1372 mc.add1(off);
1373 mc.add1(imm);
1374 }
1375 if (x86Assembler.TRACE) dbg(mc, 4, desc, DISP8ToString(off, base), SEImm8ToString(imm));
1376 return 4;
1377 }
1378 public static final int s_2_DISP8_Imm8() { return 4; }
1379 final int emit2_DISP8_Imm8(CodeAllocator.x86CodeBuffer mc, byte off, int base, int imm) {
1380 Assert._assert(length == 2);
1381 Assert._assert(base != ESP);
1382 Assert._assert((opcode & 0xC7) == 0);
1383 Assert._assert(base >= EAX && base <= EDI);
1384 if (mc != null) {
1385 mc.add2(opcode | MOD_DISP8 | base);
1386 mc.add1(off);
1387 mc.add1((byte)imm);
1388 }
1389 if (x86Assembler.TRACE) dbg(mc, 4, desc, DISP8ToString(off, base), Imm8ToString(imm));
1390 return 4;
1391 }
1392 public static final int s_2_DISP8_Imm32() { return 7; }
1393 final int emit2_DISP8_Imm32(CodeAllocator.x86CodeBuffer mc, byte off, int base, int imm) {
1394 Assert._assert(length == 2);
1395 Assert._assert(base != ESP);
1396 Assert._assert((opcode & 0xC7) == 0);
1397 Assert._assert(base >= EAX && base <= EDI);
1398 if (mc != null) {
1399 mc.add2(opcode | MOD_DISP8 | base);
1400 mc.add1(off);
1401 mc.add4_endian(imm);
1402 }
1403 if (x86Assembler.TRACE) dbg(mc, 7, desc, DISP8ToString(off, base), Imm32ToString(imm));
1404 return 7;
1405 }
1406 public static final int s_2_SIB_DISP8() { return 4; }
1407 final int emit2_SIB_DISP8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, byte off) {
1408 Assert._assert(length == 2);
1409 Assert._assert((opcode & 0xC7) == 0);
1410 Assert._assert(base >= EAX && base <= EDI);
1411 Assert._assert(ind >= EAX && ind <= EDI);
1412 if (mc != null) {
1413 mc.add2(opcode | MOD_DISP8 | RM_SIB);
1414 mc.add1((byte)(scale | (ind << 3) | base));
1415 mc.add1(off);
1416 }
1417 if (x86Assembler.TRACE) dbg(mc, 4, desc, DISP8_SIBToString(base, ind, scale, off));
1418 return 4;
1419 }
1420 public static final int s_2_Once_SIB_DISP8() { return 4; }
1421 final int emit2_Once_SIB_DISP8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, byte off) {
1422 Assert._assert(length == 2);
1423 Assert._assert((opcode & 0xC7) == 0);
1424 Assert._assert(base >= EAX && base <= EDI);
1425 Assert._assert(ind >= EAX && ind <= EDI);
1426 if (mc != null) {
1427 mc.add2(opcode | SHIFT_ONCE | MOD_DISP8 | RM_SIB);
1428 mc.add1((byte)(scale | (ind << 3) | base));
1429 mc.add1(off);
1430 }
1431 if (x86Assembler.TRACE) dbg(mc, 4, desc, DISP8_SIBToString(base, ind, scale, off), "1");
1432 return 4;
1433 }
1434 public static final int s_2_SIB_DISP8_Imm8() { return 5; }
1435 final int emit2_SIB_DISP8_Imm8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, byte off, byte imm) {
1436 Assert._assert(length == 2);
1437 Assert._assert((opcode & 0xC7) == 0);
1438 Assert._assert(base >= EAX && base <= EDI);
1439 Assert._assert(ind >= EAX && ind <= EDI);
1440 if (mc != null) {
1441 mc.add2(opcode | MOD_DISP8 | RM_SIB);
1442 mc.add1((byte)(scale | (ind << 3) | base));
1443 mc.add1(off);
1444 mc.add1(imm);
1445 }
1446 if (x86Assembler.TRACE) dbg(mc, 5, desc, DISP8_SIBToString(base, ind, scale, off), Imm8ToString(imm));
1447 return 5;
1448 }
1449 public static final int s_2_SIB_DISP8_SEImm8() { return 5; }
1450 final int emit2_SIB_DISP8_SEImm8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, byte off, byte imm) {
1451 Assert._assert(length == 2);
1452 Assert._assert((opcode & 0xC7) == 0);
1453 Assert._assert(base >= EAX && base <= EDI);
1454 Assert._assert(ind >= EAX && ind <= EDI);
1455 if (mc != null) {
1456 mc.add2(opcode | SEIMM8 | MOD_DISP8 | RM_SIB);
1457 mc.add1((byte)(scale | (ind << 3) | base));
1458 mc.add1(off);
1459 mc.add1(imm);
1460 }
1461 if (x86Assembler.TRACE) dbg(mc, 5, desc, DISP8_SIBToString(base, ind, scale, off), SEImm8ToString(imm));
1462 return 5;
1463 }
1464 public static final int s_2_SIB_DISP8_Imm32() { return 8; }
1465 final int emit2_SIB_DISP8_Imm32(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, byte off, int imm) {
1466 Assert._assert(length == 2);
1467 Assert._assert((opcode & 0xC7) == 0);
1468 Assert._assert(base >= EAX && base <= EDI);
1469 Assert._assert(ind >= EAX && ind <= EDI);
1470 if (mc != null) {
1471 mc.add2(opcode | MOD_DISP8 | RM_SIB);
1472 mc.add1((byte)(scale | (ind << 3) | base));
1473 mc.add1(off);
1474 mc.add4_endian(imm);
1475 }
1476 if (x86Assembler.TRACE) dbg(mc, 8, desc, DISP8_SIBToString(base, ind, scale, off), Imm32ToString(imm));
1477 return 8;
1478 }
1479 public static final int s_2_DISP32() { return 6; }
1480 final int emit2_DISP32(CodeAllocator.x86CodeBuffer mc, int off, int base) {
1481 Assert._assert(length == 2);
1482 Assert._assert(base != ESP);
1483 Assert._assert((opcode & 0xC7) == 0);
1484 Assert._assert(base >= EAX && base <= EDI);
1485 if (mc != null) {
1486 mc.add2(opcode | MOD_DISP32 | base);
1487 mc.add4_endian(off);
1488 }
1489 if (x86Assembler.TRACE) dbg(mc, 6, desc, DISP32ToString(off, base));
1490 return 6;
1491 }
1492 public static final int s_2_Once_DISP32() { return 6; }
1493 final int emit2_Once_DISP32(CodeAllocator.x86CodeBuffer mc, int off, int base) {
1494 Assert._assert(length == 2);
1495 Assert._assert(base != ESP);
1496 Assert._assert((opcode & 0xC7) == 0);
1497 Assert._assert(base >= EAX && base <= EDI);
1498 if (mc != null) {
1499 mc.add2(opcode | SHIFT_ONCE | MOD_DISP32 | base);
1500 mc.add4_endian(off);
1501 }
1502 if (x86Assembler.TRACE) dbg(mc, 6, desc, DISP32ToString(off, base), "1");
1503 return 6;
1504 }
1505 public static final int s_2_DISP32_SEImm8() { return 7; }
1506 final int emit2_DISP32_SEImm8(CodeAllocator.x86CodeBuffer mc, int off, int base, byte imm) {
1507 Assert._assert(length == 2);
1508 Assert._assert(base != ESP);
1509 Assert._assert((opcode & 0xC7) == 0);
1510 Assert._assert(base >= EAX && base <= EDI);
1511 if (mc != null) {
1512 mc.add2(opcode | SEIMM8 | MOD_DISP32 | base);
1513 mc.add4_endian(off);
1514 mc.add1(imm);
1515 }
1516 if (x86Assembler.TRACE) dbg(mc, 7, desc, DISP32ToString(off, base), SEImm8ToString(imm));
1517 return 7;
1518 }
1519 public static final int s_2_DISP32_Imm8() { return 7; }
1520 final int emit2_DISP32_Imm8(CodeAllocator.x86CodeBuffer mc, int off, int base, int imm) {
1521 Assert._assert(length == 2);
1522 Assert._assert(base != ESP);
1523 Assert._assert((opcode & 0xC7) == 0);
1524 Assert._assert(base >= EAX && base <= EDI);
1525 if (mc != null) {
1526 mc.add2(opcode | MOD_DISP32 | base);
1527 mc.add4_endian(off);
1528 mc.add1((byte)imm);
1529 }
1530 if (x86Assembler.TRACE) dbg(mc, 7, desc, DISP32ToString(off, base), Imm8ToString(imm));
1531 return 7;
1532 }
1533 public static final int s_2_DISP32_Imm32() { return 10; }
1534 final int emit2_DISP32_Imm32(CodeAllocator.x86CodeBuffer mc, int off, int base, int imm) {
1535 Assert._assert(length == 2);
1536 Assert._assert(base != ESP);
1537 Assert._assert((opcode & 0xC7) == 0);
1538 Assert._assert(base >= EAX && base <= EDI);
1539 if (mc != null) {
1540 mc.add2(opcode | MOD_DISP32 | base);
1541 mc.add4_endian(off);
1542 mc.add4_endian(imm);
1543 }
1544 if (x86Assembler.TRACE) dbg(mc, 10, desc, DISP32ToString(off, base), Imm32ToString(imm));
1545 return 10;
1546 }
1547 public static final int s_2_SIB_DISP32() { return 7; }
1548 final int emit2_SIB_DISP32(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, int off) {
1549 Assert._assert(length == 2);
1550 Assert._assert((opcode & 0xFF) == 0);
1551 Assert._assert(base >= EAX && base <= EDI);
1552 if (mc != null) {
1553 mc.add2(opcode | MOD_DISP32 | RM_SIB);
1554 mc.add1((byte)(scale | (ind << 3) | base));
1555 mc.add4_endian(off);
1556 }
1557 if (x86Assembler.TRACE) dbg(mc, 7, desc, DISP32_SIBToString(base, ind, scale, off));
1558 return 7;
1559 }
1560 public static final int s_2_Once_SIB_DISP32() { return 7; }
1561 final int emit2_Once_SIB_DISP32(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, int off) {
1562 Assert._assert(length == 2);
1563 Assert._assert((opcode & 0xFF) == 0);
1564 Assert._assert(base >= EAX && base <= EDI);
1565 Assert._assert(ind >= EAX && ind <= EDI);
1566 if (mc != null) {
1567 mc.add2(opcode | SHIFT_ONCE | MOD_DISP32 | RM_SIB);
1568 mc.add1((byte)(scale | (ind << 3) | base));
1569 mc.add4_endian(off);
1570 }
1571 if (x86Assembler.TRACE) dbg(mc, 7, desc, DISP32_SIBToString(base, ind, scale, off), "1");
1572 return 7;
1573 }
1574 public static final int s_2_SIB_DISP32_SEImm8() { return 8; }
1575 final int emit2_SIB_DISP32_SEImm8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, int off, byte imm) {
1576 Assert._assert(length == 2);
1577 Assert._assert((opcode & 0xFF) == 0);
1578 Assert._assert(base >= EAX && base <= EDI);
1579 Assert._assert(ind >= EAX && ind <= EDI);
1580 if (mc != null) {
1581 mc.add2(opcode | SEIMM8 | MOD_DISP32 | RM_SIB);
1582 mc.add1((byte)(scale | (ind << 3) | base));
1583 mc.add4_endian(off);
1584 mc.add1(imm);
1585 }
1586 if (x86Assembler.TRACE) dbg(mc, 8, desc, DISP32_SIBToString(base, ind, scale, off), SEImm8ToString(imm));
1587 return 8;
1588 }
1589 public static final int s_2_SIB_DISP32_Imm8() { return 8; }
1590 final int emit2_SIB_DISP32_Imm8(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, int off, byte imm) {
1591 Assert._assert(length == 2);
1592 Assert._assert((opcode & 0xFF) == 0);
1593 Assert._assert(base >= EAX && base <= EDI);
1594 Assert._assert(ind >= EAX && ind <= EDI);
1595 if (mc != null) {
1596 mc.add2(opcode | MOD_DISP32 | RM_SIB);
1597 mc.add1((byte)(scale | (ind << 3) | base));
1598 mc.add4_endian(off);
1599 mc.add1(imm);
1600 }
1601 if (x86Assembler.TRACE) dbg(mc, 8, desc, DISP32_SIBToString(base, ind, scale, off), Imm8ToString(imm));
1602 return 8;
1603 }
1604 public static final int s_2_SIB_DISP32_Imm32() { return 11; }
1605 final int emit2_SIB_DISP32_Imm32(CodeAllocator.x86CodeBuffer mc, int base, int ind, int scale, int off, int imm) {
1606 Assert._assert(length == 2);
1607 Assert._assert((opcode & 0xFF) == 0);
1608 Assert._assert(base >= EAX && base <= EDI);
1609 Assert._assert(ind >= EAX && ind <= EDI);
1610 if (mc != null) {
1611 mc.add2(opcode | MOD_DISP32 | RM_SIB);
1612 mc.add1((byte)(scale | (ind << 3) | base));
1613 mc.add4_endian(off);
1614 mc.add4_endian(imm);
1615 }
1616 if (x86Assembler.TRACE) dbg(mc, 11, desc, DISP32_SIBToString(base, ind, scale, off), Imm32ToString(imm));
1617 return 11;
1618 }
1619 public static final int s_2_Abs32() { return 6; }
1620 final int emit2_Abs32(CodeAllocator.x86CodeBuffer mc, int addr) {
1621 Assert._assert(length == 2);
1622 Assert._assert((opcode & 0xC7) == 0);
1623 if (mc != null) {
1624 mc.add2(opcode | MOD_EA | EBP);
1625 mc.add4_endian(addr);
1626 }
1627 if (x86Assembler.TRACE) dbg(mc, 6, desc, Abs32ToString(addr));
1628 return 6;
1629 }
1630 public static final int s_3_Reg_Reg() { return 3; }
1631 final int emit3_Reg_Reg(CodeAllocator.x86CodeBuffer mc, int r1, int r2) {
1632 Assert._assert(length == 3);
1633 Assert._assert((opcode & 0xFF) == 0);
1634 Assert._assert(r1 >= EAX && r1 <= EDI);
1635 Assert._assert(r2 >= EAX && r2 <= EDI);
1636 if (mc != null) {
1637 mc.add3(opcode | MOD_REG | (r1 << 3) | r2);
1638 }
1639 if (x86Assembler.TRACE) dbg(mc, 3, desc, RegToString(r1), RegToString(r2));
1640 return 3;
1641 }
1642 public static final int s_3_Reg_EA() { return 3; }
1643 final int emit3_Reg_EA(CodeAllocator.x86CodeBuffer mc, int r1, int base) {
1644 Assert._assert(length == 3);
1645 Assert._assert(base != ESP);
1646 Assert._assert(base != EBP);
1647 Assert._assert((opcode & 0xFF) == 0);
1648 Assert._assert(r1 >= EAX && r1 <= EDI);
1649 Assert._assert(base >= EAX && base <= EDI);
1650 if (mc != null) {
1651 mc.add3(opcode | MOD_EA | (r1 << 3) | base);
1652 }
1653 if (x86Assembler.TRACE) dbg(mc, 3, desc, RegToString(r1), EAToString(base));
1654 return 3;
1655 }
1656 public static final int s_3_Reg_DISP8() { return 4; }
1657 final int emit3_Reg_DISP8(CodeAllocator.x86CodeBuffer mc, int r1, byte off, int base) {
1658 Assert._assert(length == 3);
1659 Assert._assert(base != ESP);
1660 Assert._assert((opcode & 0xFF) == 0);
1661 Assert._assert(r1 >= EAX && r1 <= EDI);
1662 Assert._assert(base >= EAX && base <= EDI);
1663 if (mc != null) {
1664 mc.add3(opcode | MOD_DISP8 | (r1 << 3) | base);
1665 mc.add1(off);
1666 }
1667 if (x86Assembler.TRACE) dbg(mc, 4, desc, RegToString(r1), DISP8ToString(off, base));
1668 return 4;
1669 }
1670 public static final int s_3_Reg_DISP32() { return 7; }
1671 final int emit3_Reg_DISP32(CodeAllocator.x86CodeBuffer mc, int r1, int off, int base) {
1672 Assert._assert(length == 3);
1673 Assert._assert(base != ESP);
1674 Assert._assert((opcode & 0xFF) == 0);
1675 Assert._assert(r1 >= EAX && r1 <= EDI);
1676 Assert._assert(base >= EAX && base <= EDI);
1677 if (mc != null) {
1678 mc.add3(opcode | MOD_DISP32 | (r1 << 3) | base);
1679 mc.add4_endian(off);
1680 }
1681 if (x86Assembler.TRACE) dbg(mc, 7, desc, RegToString(r1), DISP32ToString(off, base));
1682 return 7;
1683 }
1684 public static final int s_3_Reg_SIB_EA() { return 4; }
1685 final int emit3_Reg_SIB_EA(CodeAllocator.x86CodeBuffer mc, int r1, int base, int ind, int scale) {
1686 Assert._assert(length == 3);
1687 Assert._assert((opcode & 0xFF) == 0);
1688 Assert._assert(r1 >= EAX && r1 <= EDI);
1689 Assert._assert(ind >= EAX && ind <= EDI);
1690 Assert._assert(base >= EAX && base <= EDI);
1691 if (mc != null) {
1692 mc.add3(opcode | MOD_EA | (r1 << 3) | RM_SIB);
1693 mc.add1((byte)(scale | (ind << 3) | base));
1694 }
1695 if (x86Assembler.TRACE) dbg(mc, 4, desc, RegToString(r1), EA_SIBToString(base, ind, scale));
1696 return 4;
1697 }
1698 public static final int s_3_Reg_SIB_DISP8() { return 5; }
1699 final int emit3_Reg_SIB_DISP8(CodeAllocator.x86CodeBuffer mc, int r1, int base, int ind, int scale, byte off) {
1700 Assert._assert(length == 3);
1701 Assert._assert((opcode & 0xFF) == 0);
1702 Assert._assert(r1 >= EAX && r1 <= EDI);
1703 Assert._assert(ind >= EAX && ind <= EDI);
1704 Assert._assert(base >= EAX && base <= EDI);
1705 if (mc != null) {
1706 mc.add3(opcode | MOD_DISP8 | (r1 << 3) | RM_SIB);
1707 mc.add1((byte)(scale | (ind << 3) | base));
1708 mc.add1(off);
1709 }
1710 if (x86Assembler.TRACE) dbg(mc, 5, desc, RegToString(r1), DISP8_SIBToString(base, ind, scale, off));
1711 return 5;
1712 }
1713 public static final int s_3_Reg_SIB_DISP32() { return 8; }
1714 final int emit3_Reg_SIB_DISP32(CodeAllocator.x86CodeBuffer mc, int r1, int base, int ind, int scale, int off) {
1715 Assert._assert(length == 3);
1716 Assert._assert((opcode & 0xFF) == 0);
1717 Assert._assert(r1 >= EAX && r1 <= EDI);
1718 Assert._assert(ind >= EAX && ind <= EDI);
1719 Assert._assert(base >= EAX && base <= EDI);
1720 if (mc != null) {
1721 mc.add3(opcode | MOD_DISP32 | (r1 << 3) | RM_SIB);
1722 mc.add1((byte)(scale | (ind << 3) | base));
1723 mc.add4_endian(off);
1724 }
1725 if (x86Assembler.TRACE) dbg(mc, 8, desc, RegToString(r1), DISP32_SIBToString(base, ind, scale, off));
1726 return 8;
1727 }
1728 public static final int s_3_Reg_Abs32() { return 7; }
1729 final int emit3_Reg_Abs32(CodeAllocator.x86CodeBuffer mc, int r1, int addr) {
1730 Assert._assert(length == 3);
1731 Assert._assert((opcode & 0xFF) == 0);
1732 Assert._assert(r1 >= EAX && r1 <= EDI);
1733 if (mc != null) {
1734 mc.add3(opcode | MOD_EA | (r1 << 3) | EBP);
1735 mc.add4_endian(addr);
1736 }
1737 if (x86Assembler.TRACE) dbg(mc, 7, desc, RegToString(r1), Abs32ToString(addr));
1738 return 7;
1739 }
1740
1741 static String RegToString(int reg) {
1742 switch (reg) {
1743 case EAX: return "EAX";
1744 case EBX: return "EBX";
1745 case ECX: return "ECX";
1746 case EDX: return "EDX";
1747 case ESP: return "ESP";
1748 case EBP: return "EBP";
1749 case ESI: return "ESI";
1750 case EDI: return "EDI";
1751 default: throw new InternalError();
1752 }
1753 }
1754
1755 static String FPRegToString(int r) {
1756 return "ST("+r+")";
1757 }
1758
1759 static String EAToString(int base) {
1760 Assert._assert(base != EBP);
1761 Assert._assert(base != ESP);
1762 return "("+RegToString(base)+")";
1763 }
1764
1765 static String DISP8ToString(byte off, int base) {
1766 Assert._assert(base != ESP);
1767 return off+"("+RegToString(base)+")";
1768 }
1769
1770 static String DISP32ToString(int off, int base) {
1771 Assert._assert(base != ESP);
1772 return off+"("+RegToString(base)+")";
1773 }
1774
1775 static String EA_SIBToString(int base, int ind, int scale) {
1776 if (ind == ESP)
1777 return "("+RegToString(base)+")";
1778 else
1779 return "("+RegToString(base)+"+("+RegToString(ind)+ScaleToString(scale)+") )";
1780 }
1781
1782 static String DISP8_SIBToString(int base, int ind, int scale, byte off) {
1783 if (ind == ESP)
1784 return "("+RegToString(base)+"+"+off+")";
1785 else
1786 return "("+RegToString(base)+"+("+RegToString(ind)+ScaleToString(scale)+"+"+off+") )";
1787 }
1788
1789 static String DISP32_SIBToString(int base, int ind, int scale, int off) {
1790 if (ind == ESP)
1791 return "("+RegToString(base)+"+"+off+")";
1792 else
1793 return "("+RegToString(base)+"+("+RegToString(ind)+ScaleToString(scale)+"+"+off+") )";
1794 }
1795
1796 static String ScaleToString(int scale) {
1797 switch (scale) {
1798 case SCALE_1: return "*1";
1799 case SCALE_2: return "*2";
1800 case SCALE_4: return "*4";
1801 case SCALE_8: return "*8";
1802 default: throw new InternalError();
1803 }
1804 }
1805
1806 static String SEImm8ToString(byte imm) {
1807 return "seimm8:"+imm;
1808 }
1809
1810 static String Imm8ToString(int imm) {
1811 return "imm8:"+imm;
1812 }
1813
1814 static String Imm16ToString(char imm) {
1815 return "imm16:"+(int)imm;
1816 }
1817
1818 static String Imm32ToString(int imm) {
1819 return "imm32:"+imm;
1820 }
1821
1822 static String Abs32ToString(int imm) {
1823 return "abs32:"+imm;
1824 }
1825
1826 StringBuffer _dbg(CodeAllocator.x86CodeBuffer mc, int length, String opc) {
1827 StringBuffer s = new StringBuffer();
1828 if (mc != null) {
1829 int n = mc.getCurrentOffset();
1830 s.append(Strings.hex(n - length));
1831 s.append('\t');
1832 while (length > 0) {
1833 int b = ((int)mc.get1(n-length)) & 0xFF;
1834 --length;
1835 String str = Integer.toHexString(b);
1836 if (b <= 0x0f) s.append('0');
1837 s.append(str);
1838 }
1839 }
1840 s.append('\t');
1841 s.append(opc);
1842 return s;
1843 }
1844
1845 void dbg(CodeAllocator.x86CodeBuffer mc, int length, String opc) {
1846 StringBuffer s = _dbg(mc, length, opc);
1847 System.out.println(s.toString());
1848 }
1849
1850 void dbg(CodeAllocator.x86CodeBuffer mc, int length, String opc, String p1) {
1851 StringBuffer s = _dbg(mc, length, opc);
1852 s.append('\t'); s.append(p1);
1853 System.out.println(s.toString());
1854 }
1855
1856 void dbg(CodeAllocator.x86CodeBuffer mc, int length, String opc, String p1, String p2) {
1857 StringBuffer s = _dbg(mc, length, opc);
1858 s.append('\t'); s.append(p1);
1859 s.append('\t'); s.append(p2);
1860 System.out.println(s.toString());
1861 }
1862
1863 void dbg(CodeAllocator.x86CodeBuffer mc, int length, String opc, String p1, String p2, String p3) {
1864 StringBuffer s = _dbg(mc, length, opc);
1865 s.append('\t'); s.append(p1);
1866 s.append('\t'); s.append(p2);
1867 s.append('\t'); s.append(p3);
1868 System.out.println(s.toString());
1869 }
1870
1871 private static x86 _op(int opcode,
1872 int length,
1873 int pairing,
1874 int uops,
1875 String desc) {
1876 x86 o = new x86();
1877 o.opcode = opcode;
1878 o.length = length;
1879 o.pairing = pairing;
1880 o.microops = uops;
1881 o.desc = desc;
1882 return o;
1883 }
1884
1885 private static x86 _sop(int opcode,
1886 int length,
1887 int pairing,
1888 int uops,
1889 String desc) {
1890 x86 o = new x86();
1891 o.opcode = opcode;
1892 o.length = length;
1893 o.pairing = pairing;
1894 o.microops = uops;
1895 o.desc = desc;
1896 return o;
1897 }
1898
1899 }